From 60ceded171e173810198a1bf6145beb928d289d0 Mon Sep 17 00:00:00 2001 From: Jim Schubert Date: Tue, 9 Jun 2020 06:28:58 -0400 Subject: [PATCH] [ci][cli] Moving ensures script to config-based batch generation of samples (#6509) * Ensure CLI-level generator settings are available in additional properties * Initial conversion to yaml configs Configs prefix with 1- need to be manually evaluated. * Add "other" configs not in ensure-up-to-date * Add other/openapi3 files * Cleanup all generation scripts * Clean up: add missed configs and fix some openapi 3 diffs * Move generate-samples script, error on batch failures * Temporarily disable elm which requires skip validation of spec * CI updates (todo: run all generators through appveyor or move to github workflows) * Add success count to batch generation command output * [samples] Regenerate * Remove bin/windows * Generate swift5 samples in bitrise * Expand user input glob pattern * Regenerate samples * Update PR template * Support config based generateAliasAsModel * [samples] Regenerate * [rust] Generate as alias for all samples configs * [csharp] Move test staged file changes to in-directory * Include "live" test files and ignore test cache files from samples.ci * Remove concept of samples.ci staging Generators support .openapi-generator-ignore, allowing maintainers to explicitly ignore the regeneration of files which have been modified. Note that the tooling does not overwrite test files whenever those files exist, and it's not entirely necessary to add test files to the ignore file. * Re-add meta generator scripts * Modify ensure-up-to-date to log stdout, so script does not look like it hangs on slower machines * [csharp] Regenerate sample * Set generateAliasAsModel CodegenConfigurator#toContext This ensures the property (which is effectively a thread-local) gets set as expected if the caller resets GlobalSettings as is done in the GenerateBatch command. * [rust] Regenerate samples * Re-enable elm * [java] Support OffsetDateTime example, fail ensures script on any generation error * [samples] Regenerate * Fix jersey2-java8 ignore file * Fix elm spec validation * Force UTC in sample generation to avoid timezone conflicts during generation (user vs ci) Co-authored-by: William Cheng --- .github/PULL_REQUEST_TEMPLATE.md | 4 +- CI/.drone.yml | 4 +- CI/bitrise.yml | 2 +- .../Org.OpenAPITools.Test.csproj | 31 - .../Org.OpenAPITools.Test.AssemblyInfo.cs | 23 - ...OpenAPITools.Test.AssemblyInfoInputs.cache | 1 - .../Org.OpenAPITools.Test.csproj | 31 - .../Org.OpenAPITools.Test.AssemblyInfo.cs | 23 - ...OpenAPITools.Test.AssemblyInfoInputs.cache | 1 - .../Org.OpenAPITools.Test.csproj | 92 --- ...PITools.Test.csprojAssemblyReference.cache | Bin 2076 -> 0 bytes .../petstore/java/jersey2-java6/build.gradle | 122 ---- .../test-manual/common/ConfigurationTest.java | 15 - .../test-manual/common/StringUtilTest.java | 33 - .../test-manual/jersey1/ApiClientTest.java | 291 --------- .../jersey1/auth/ApiKeyAuthTest.java | 71 --- .../jersey1/auth/HttpBasicAuthTest.java | 54 -- .../jersey1/model/EnumValueTest.java | 63 -- .../jersey2-java8/JSONComposedSchemaTest.java | 68 --- .../test-manual/jersey2-java8/JSONTest.java | 45 -- .../test-manual/jersey2/ApiClientTest.java | 249 -------- .../java/test-manual/jersey2/JSONTest.java | 58 -- .../jersey2/auth/ApiKeyAuthTest.java | 70 --- .../jersey2/auth/HttpBasicAuthTest.java | 54 -- .../jersey2/model/EnumValueTest.java | 63 -- .../okhttp-gson/ApiClientTest.java | 347 ----------- .../test-manual/okhttp-gson/JSONTest.java | 202 ------- .../okhttp-gson/api/PetApiTest.java | 564 ------------------ .../okhttp-gson/auth/ApiKeyAuthTest.java | 119 ---- .../okhttp-gson/auth/HttpBasicAuthTest.java | 64 -- .../model/ArrayOfArrayOfNumberOnlyTest.java | 72 --- .../okhttp-gson/model/EnumValueTest.java | 56 -- .../okhttp-gson/model/PetTest.java | 103 ---- .../resttemplate/ApiClientTest.java | 253 -------- .../resttemplate/auth/ApiKeyAuthTest.java | 69 --- .../resttemplate/auth/HttpBasicAuthTest.java | 56 -- .../resttemplate/model/EnumValueTest.java | 63 -- .../client/petstore/kotlin-string/pom.xml | 46 -- .../client/petstore/kotlin-threetenbp/pom.xml | 46 -- .../typescript-fetch/builds/default/pom.xml | 26 - .../builds/es6-target/pom.xml | 59 -- .../builds/multiple-parameters/pom.xml | 26 - .../prefix-parameter-interfaces/pom.xml | 73 --- .../builds/with-npm-version/pom.xml | 73 --- .../typescript-fetch/tests/default/pom.xml | 59 -- .../pom.xml | 46 -- .../pom.xml | 46 -- .../pom.xml | 46 -- .../pom.xml | 46 -- .../pom.xml | 46 -- .../java-play-framework-no-interface/pom.xml | 46 -- .../java-play-framework-no-swagger-ui/pom.xml | 46 -- .../java-play-framework-no-wrap-calls/pom.xml | 46 -- .../petstore/java-play-framework/pom.xml | 46 -- .../petstore/kotlin-server/ktor/pom.xml | 46 -- ...ITools.Test.csproj.CoreCompileInputs.cache | 1 - ....Test.csprojResolveAssemblyReference.cache | Bin 5893 -> 0 bytes appveyor.yml | 9 +- bin/ada-petstore.sh | 36 -- bin/android-petstore-all.sh | 5 - bin/android-petstore-httpclient.sh | 32 - bin/android-petstore-volley.json | 4 - bin/android-petstore-volley.sh | 32 - bin/apache2-petstore-config.sh | 32 - bin/apex-petstore.sh | 32 - bin/asciidoc-documentation-petstore.sh | 31 - bin/aspnetcore-petstore-server-3.0.sh | 32 - bin/aspnetcore-petstore-server-3.1.sh | 32 - bin/aspnetcore-petstore-server.sh | 32 - bin/aspnetcore3-petstore-server.sh | 32 - bin/avro-petstore.sh | 32 - bin/bash-petstore.sh | 32 - bin/c-petstore.sh | 32 - bin/ci/apex-petstore.json | 6 - bin/ci/csharp-netcore-petstore-1.json | 11 - bin/ci/csharp-netcore-petstore.json | 10 - bin/ci/csharp-petstore.json | 8 - bin/ci/dart-flutter-petstore.json | 11 - bin/ci/dart-jaguar-petstore-1.json | 10 - bin/ci/dart-jaguar-petstore-2.json | 11 - bin/ci/dart-jaguar-petstore-3.json | 11 - bin/ci/dart-jaguar-petstore.json | 10 - bin/ci/dart-petstore-flutter.json | 11 - .../dart-petstore-openapi-browser-client.json | 11 - bin/ci/dart-petstore.json | 11 - bin/ci/dart2-petstore.json | 9 - bin/ci/elixir-petstore.json | 9 - bin/ci/go-gin-petstore-server.json | 10 - bin/ci/go-petstore-withxml.json | 11 - bin/ci/go-petstore.json | 9 - bin/ci/groovy-petstore.json | 9 - bin/ci/haskell-http-client-petstore.json | 6 - bin/ci/java-feign.json | 12 - bin/ci/java-feign10x.json | 11 - bin/ci/java-google-api-client.json | 10 - .../java-jaxrs-cxf-annotated-base-path.json | 12 - bin/ci/java-jaxrs-cxf-cdi.json | 9 - bin/ci/java-jaxrs-cxf-non-spring-app.json | 12 - bin/ci/java-jaxrs-cxf.json | 10 - bin/ci/java-jaxrs-datelib-j8.json | 11 - bin/ci/java-jaxrs-jersey.json | 10 - bin/ci/java-jaxrs-jersey1-useTags.json | 13 - bin/ci/java-jaxrs-jersey1.json | 12 - bin/ci/java-jaxrs-jersey2-useTags.json | 12 - bin/ci/java-jaxrs-jersey2.json | 11 - .../java-jaxrs-resteasy-eap-java8-server.json | 11 - .../java-jaxrs-resteasy-eap-joda-server.json | 11 - bin/ci/java-jaxrs-resteasy-eap.json | 9 - bin/ci/java-jaxrs-resteasy-joda-server.json | 11 - bin/ci/java-jaxrs-resteasy.json | 9 - bin/ci/java-jaxrs-spec-interface.json | 11 - bin/ci/java-jaxrs-spec.json | 10 - bin/ci/java-jersey1.json | 11 - bin/ci/java-jersey2-java6.json | 12 - bin/ci/java-jersey2-java8.json | 11 - bin/ci/java-jersey2.json | 9 - bin/ci/java-msf4j-petstore-server.json | 10 - bin/ci/java-native.json | 10 - bin/ci/java-okhttp-gson-parcelableModel.json | 12 - bin/ci/java-okhttp-gson.json | 10 - bin/ci/java-petstore-feign-10x.json | 11 - ...a-play-framework-api-package-override.json | 10 - bin/ci/java-play-framework-async.json | 10 - .../java-play-framework-controller-only.json | 10 - .../java-play-framework-fake-endpoints.json | 9 - ...ava-play-framework-no-bean-validation.json | 10 - ...-play-framework-no-exception-handling.json | 10 - bin/ci/java-play-framework-no-interface.json | 10 - bin/ci/java-play-framework-no-swagger-ui.json | 10 - bin/ci/java-play-framework-no-wrap-calls.json | 10 - bin/ci/java-play-framework.json | 9 - bin/ci/java-rest-assured-jackson.json | 16 - bin/ci/java-rest-assured.json | 11 - bin/ci/java-resteasy.json | 9 - bin/ci/java-resttemplate-withXml.json | 11 - bin/ci/java-resttemplate.json | 9 - bin/ci/java-retrofit.json | 10 - bin/ci/java-retrofit2-play24.json | 10 - bin/ci/java-retrofit2-play25.json | 10 - bin/ci/java-retrofit2-play26.json | 10 - bin/ci/java-retrofit2.json | 10 - bin/ci/java-retrofit2rx.json | 11 - bin/ci/java-retrofit2rx2.json | 11 - bin/ci/java-vertx.json | 10 - bin/ci/java-webclient.json | 9 - bin/ci/javascript-petstore-1.json | 11 - bin/ci/javascript-petstore-2.json | 9 - bin/ci/javascript-petstore-3.json | 11 - bin/ci/javascript-petstore.json | 10 - .../kotlin-client-petstore-multiplatform.json | 11 - bin/ci/kotlin-client-petstore.json | 11 - bin/ci/kotlin-client-string.json | 13 - bin/ci/kotlin-client-threetenbp.json | 10 - bin/ci/kotlin-server-petstore.json | 11 - ...n-springboot-petstore-server-reactive.json | 13 - bin/ci/kotlin-springboot-petstore-server.json | 12 - bin/ci/mysql-schema-petstore.json | 6 - bin/ci/openapi3-jaxrs-jersey-petstore.json | 10 - bin/ci/openapi3-php-petstore.json | 6 - bin/ci/openapi3-python-petstore.json | 9 - ...openapi3-ruby-client-faraday-petstore.json | 10 - bin/ci/openapi3-ruby-client-petstore.json | 10 - bin/ci/perl-petstore-1.json | 10 - bin/ci/perl-petstore.json | 8 - bin/ci/php-lumen-petstore-server.json | 6 - bin/ci/php-petstore.json | 6 - bin/ci/php-silex-petstore-server.json | 6 - bin/ci/php-slim-server-petstore.json | 6 - bin/ci/php-slim4-server-petstore.json | 6 - bin/ci/php-symfony-petstore.json | 6 - bin/ci/php-ze-ph-petstore-server.json | 6 - bin/ci/python-experimental.json | 9 - bin/ci/python-petstore-1.json | 9 - bin/ci/python-petstore-2.json | 10 - bin/ci/python-petstore.json | 10 - bin/ci/r-petstore.json | 9 - bin/ci/ruby-client-petstore-faraday.json | 7 - bin/ci/ruby-client-petstore.json | 7 - bin/ci/rust-server-petstore-1.json | 11 - bin/ci/rust-server-petstore-2.json | 11 - bin/ci/rust-server-petstore-3.json | 11 - bin/ci/rust-server-petstore-4.json | 11 - bin/ci/rust-server-petstore.json | 11 - bin/ci/spring-cloud-async.json | 12 - bin/ci/spring-cloud-feign-petstore.json | 11 - bin/ci/spring-petstore-10.json | 11 - bin/ci/spring-petstore-11.json | 11 - bin/ci/spring-petstore-12.json | 10 - bin/ci/spring-petstore-13.json | 11 - bin/ci/spring-petstore-2.json | 11 - bin/ci/spring-petstore-3.json | 13 - bin/ci/spring-petstore-4.json | 12 - bin/ci/spring-petstore-5.json | 12 - bin/ci/spring-petstore-6.json | 12 - bin/ci/spring-petstore-7.json | 11 - bin/ci/spring-petstore-8.json | 11 - bin/ci/spring-petstore-9.json | 12 - bin/ci/spring-stubs.json | 11 - bin/ci/typescript-angular-petstore-1.json | 9 - bin/ci/typescript-angular-petstore-10.json | 10 - bin/ci/typescript-angular-petstore-11.json | 8 - bin/ci/typescript-angular-petstore-12.json | 9 - bin/ci/typescript-angular-petstore-13.json | 9 - bin/ci/typescript-angular-petstore-2.json | 9 - bin/ci/typescript-angular-petstore-3.json | 9 - bin/ci/typescript-angular-petstore-4.json | 9 - bin/ci/typescript-angular-petstore-5.json | 9 - bin/ci/typescript-angular-petstore-6.json | 10 - bin/ci/typescript-angular-petstore-7.json | 8 - bin/ci/typescript-angular-petstore-8.json | 9 - bin/ci/typescript-angular-petstore-9.json | 9 - bin/ci/typescript-angular-petstore.json | 8 - bin/ci/typescript-angularjs-petstore.json | 5 - bin/ci/typescript-aurelia-petstore.json | 5 - bin/ci/typescript-axios-petstore-1.json | 6 - bin/ci/typescript-axios-petstore-2.json | 6 - bin/ci/typescript-axios-petstore-3.json | 5 - bin/ci/typescript-axios-petstore-4.json | 8 - bin/ci/typescript-axios-petstore-5.json | 5 - bin/ci/typescript-axios-petstore.json | 6 - bin/ci/typescript-fetch-petstore-1.json | 6 - bin/ci/typescript-fetch-petstore-2.json | 8 - bin/ci/typescript-fetch-petstore-3.json | 5 - bin/ci/typescript-fetch-petstore-4.json | 6 - bin/ci/typescript-fetch-petstore-5.json | 6 - bin/ci/typescript-fetch-petstore.json | 6 - bin/ci/typescript-inversify-petstore.json | 5 - bin/ci/typescript-jquery-petstore-1.json | 6 - bin/ci/typescript-jquery-petstore.json | 5 - bin/ci/typescript-node-petstore-1.json | 5 - bin/ci/typescript-node-petstore.json | 6 - bin/ci/typescript-rxjs-petstore-1.json | 6 - bin/ci/typescript-rxjs-petstore-2.json | 8 - bin/ci/typescript-rxjs-petstore-3.json | 5 - bin/ci/typescript-rxjs-petstore.json | 6 - bin/clojure-petstore.sh | 32 - bin/configs/apex.yaml | 6 + bin/configs/cpp-qt5-qhttpengine-server.yaml | 4 + bin/configs/cpp-restsdk-client.yaml | 4 + bin/configs/csharp-OpenAPIClient.yaml | 5 + bin/configs/csharp-netcore-OpenAPIClient.yaml | 7 + .../csharp-netcore-OpenAPIClientCore.yaml | 8 + bin/configs/dart-jaguar-openapi-flutter.yaml | 7 + .../dart-jaguar-openapi-flutter_proto.yaml | 8 + bin/configs/dart-jaguar-openapi.yaml | 7 + bin/configs/dart-jaguar-openapi_proto.yaml | 8 + bin/configs/dart-openapi-browser-client.yaml | 8 + bin/configs/dart-openapi-flutter.yaml | 8 + bin/configs/dart-openapi.yaml | 8 + bin/configs/dart-petstore_client_lib.yaml | 6 + bin/configs/elixir.yaml | 6 + bin/configs/elm.yaml | 4 + .../go-experimental-go-petstore-oas2.yaml | 6 + bin/configs/go-experimental-go-petstore.yaml | 7 + .../go-gin-server-go-gin-api-server.yaml | 7 + bin/configs/go-petstore-oas2.yaml | 6 + bin/configs/go-petstore-withXml.yaml | 8 + bin/configs/go-petstore.yaml | 7 + bin/configs/go-server-go-api-server.yaml | 7 + bin/configs/groovy.yaml | 6 + bin/configs/haskell-http-client.yaml | 4 + bin/configs/java-feign10x.yaml | 9 + bin/configs/java-google-api-client.yaml | 8 + bin/configs/java-jersey1.yaml | 8 + bin/configs/java-jersey2-8-oas2.yaml | 9 + bin/configs/java-jersey2-8.yaml | 9 + .../java-microprofile-rest-client.yaml | 6 + bin/configs/java-msf4j.yaml | 7 + bin/configs/java-native.yaml | 8 + .../java-okhttp-gson-parcelableModel.yaml | 9 + bin/configs/java-okhttp-gson.yaml | 8 + ...a-play-framework-api-package-override.yaml | 7 + bin/configs/java-play-framework-async.yaml | 7 + .../java-play-framework-controller-only.yaml | 7 + .../java-play-framework-fake-endpoints.yaml | 6 + ...ava-play-framework-no-bean-validation.yaml | 7 + ...-play-framework-no-exception-handling.yaml | 7 + .../java-play-framework-no-interface.yaml | 7 + .../java-play-framework-no-swagger-ui.yaml | 7 + .../java-play-framework-no-wrap-calls.yaml | 7 + bin/configs/java-play-framework.yaml | 6 + bin/configs/java-rest-assured-jackson.yaml | 14 + bin/configs/java-rest-assured.yaml | 11 + bin/configs/java-resteasy.yaml | 7 + bin/configs/java-resttemplate-withXml.yaml | 8 + bin/configs/java-resttemplate.yaml | 7 + bin/configs/java-retrofit2-play24.yaml | 12 + bin/configs/java-retrofit2-play25.yaml | 11 + bin/configs/java-retrofit2-play26.yaml | 11 + bin/configs/java-retrofit2.yaml | 8 + bin/configs/java-retrofit2rx.yaml | 9 + bin/configs/java-retrofit2rx2.yaml | 9 + bin/configs/java-vertx.yaml | 9 + bin/configs/java-webclient.yaml | 7 + bin/configs/javascript-es6.yaml | 6 + bin/configs/javascript-promise-es6.yaml | 7 + .../jaxrs-cxf-annotated-base-path.yaml | 9 + bin/configs/jaxrs-cxf-cdi.yaml | 6 + bin/configs/jaxrs-cxf-non-spring-app.yaml | 9 + bin/configs/jaxrs-cxf.yaml | 7 + .../jaxrs-jersey-jaxrs-datelib-j8.yaml | 12 + bin/configs/jaxrs-jersey-jersey1-useTags.yaml | 10 + bin/configs/jaxrs-jersey-jersey1.yaml | 9 + bin/configs/jaxrs-jersey-jersey2-useTags.yaml | 9 + bin/configs/jaxrs-jersey-jersey2.yaml | 8 + bin/configs/jaxrs-jersey.yaml | 8 + bin/configs/jaxrs-resteasy-default.yaml | 6 + bin/configs/jaxrs-resteasy-eap-eap-java8.yaml | 8 + bin/configs/jaxrs-resteasy-eap-eap-joda.yaml | 8 + bin/configs/jaxrs-resteasy-eap-eap.yaml | 6 + bin/configs/jaxrs-resteasy-joda.yaml | 8 + bin/configs/jaxrs-spec-interface.yaml | 8 + bin/configs/jaxrs-spec.yaml | 7 + bin/configs/kotlin-gson.yaml | 7 + bin/configs/kotlin-jackson.yaml | 8 + bin/configs/kotlin-json-request-string.yaml | 7 + bin/configs/kotlin-jvm-okhttp3-okhttp3.yaml | 7 + .../kotlin-jvm-okhttp4-coroutines.yaml | 11 + .../kotlin-jvm-retrofit2-retrofit2.yaml | 7 + bin/configs/kotlin-moshi-codegen.yaml | 8 + bin/configs/kotlin-multiplatform.yaml | 7 + bin/configs/kotlin-nonpublic.yaml | 7 + bin/configs/kotlin-nullable.yaml | 8 + bin/configs/kotlin-server-ktor.yaml | 8 + bin/configs/kotlin-spring-boot-reactive.yaml | 10 + bin/configs/kotlin-spring-boot.yaml | 10 + bin/configs/kotlin-string.yaml | 10 + bin/configs/kotlin-threetenbp.yaml | 7 + bin/configs/kotlin.yaml | 8 + bin/configs/lua.yaml | 6 + bin/configs/mysql-schema-mysql.yaml | 4 + bin/configs/nim.yaml | 6 + bin/configs/other/ada.yaml | 7 + bin/configs/other/android-httpclient.yaml | 6 + bin/configs/other/android-volley.yaml | 6 + bin/configs/other/apache2.yaml | 4 + bin/configs/other/asciidoc.yaml | 7 + bin/configs/other/aspnetcore-3.0.yaml | 7 + bin/configs/other/aspnetcore-3.1.yaml | 7 + bin/configs/other/aspnetcore.yaml | 6 + bin/configs/other/avro-schema.yaml | 4 + bin/configs/other/bash.yaml | 14 + bin/configs/other/c.yaml | 4 + bin/configs/other/clojure.yaml | 3 + .../cpp-pistache-server-cpp-pistache.yaml | 7 + bin/configs/other/cpp-qt5-client.yaml | 7 + .../other/cpp-restbed-server-cpp-restbed.yaml | 3 + bin/configs/other/cpp-tizen.yaml | 4 + bin/configs/other/cpp-ue4.yaml | 4 + .../other/csharp-OpenAPIClientNet35.yaml | 6 + .../other/csharp-OpenAPIClientNet40.yaml | 6 + .../csharp-OpenAPIClientNetCoreProject.yaml | 7 + .../csharp-OpenAPIClientNetStandard.yaml | 6 + ...harp-OpenAPIClientWithPropertyChanged.yaml | 7 + .../other/csharp-dotnet2-OpenAPIClient.yaml | 6 + .../other/csharp-nancyfx-nancyfx-async.yaml | 7 + bin/configs/other/csharp-nancyfx-nancyfx.yaml | 7 + bin/configs/other/cwiki.yaml | 4 + bin/configs/other/dart-dio.yaml | 6 + bin/configs/other/dynamic-html.yaml | 3 + bin/configs/other/eiffel.yaml | 3 + bin/configs/other/erlang-client.yaml | 6 + bin/configs/other/erlang-proper.yaml | 6 + bin/configs/other/erlang-server.yaml | 4 + bin/configs/other/flash.yaml | 7 + bin/configs/other/fsharp-functions.yaml | 3 + .../fsharp-giraffe-server-fsharp-giraffe.yaml | 4 + .../other/graphql-nodejs-express-server.yaml | 6 + bin/configs/other/graphql-schema.yaml | 6 + bin/configs/other/haskell-servant.yaml | 4 + bin/configs/other/html.md.yaml | 3 + bin/configs/other/html.yaml | 4 + bin/configs/other/html2.yaml | 6 + bin/configs/other/java-inflector.yaml | 6 + bin/configs/other/java-native-async.yaml | 9 + bin/configs/other/java-pkmst.yaml | 6 + .../java-undertow-server-java-undertow.yaml | 6 + bin/configs/other/java-vertx-async.yaml | 6 + bin/configs/other/java-vertx-rx.yaml | 8 + bin/configs/other/java-vertx-web-rx.yaml | 7 + bin/configs/other/javascript-apollo.yaml | 6 + .../other/javascript-closure-angular.yaml | 3 + bin/configs/other/javascript-flowtyped.yaml | 6 + bin/configs/other/jaxrs-cxf-client.yaml | 6 + ...axrs-cxf-extended-jaxrs-cxf-test-data.yaml | 14 + .../other/jaxrs-spec-interface-response.yaml | 9 + bin/configs/other/jmeter.yaml | 3 + bin/configs/other/k6.yaml | 3 + .../kotlin-spring-boot-modelMutable.yaml | 11 + bin/configs/other/kotlin-uppercase-enum.yaml | 7 + bin/configs/other/kotlin-vertx-vertx.yaml | 5 + bin/configs/other/markdown.yaml | 4 + bin/configs/other/nodejs-express-server.yaml | 4 + bin/configs/other/objc-core-data.yaml | 8 + bin/configs/other/objc-default.yaml | 7 + bin/configs/other/ocaml.yaml | 6 + .../other/openapi3/android-httpclient.yaml | 6 + .../other/openapi3/android-volley.yaml | 6 + bin/configs/other/openapi3/avro-schema.yaml | 4 + bin/configs/other/openapi3/bash.yaml | 14 + bin/configs/other/openapi3/clojure.yaml | 3 + .../cpp-pistache-server-cpp-pistache.yaml | 4 + .../openapi3/cpp-qt5-client-cpp-qt5.yaml | 4 + .../openapi3/cpp-qt5-qhttpengine-server.yaml | 4 + .../cpp-restbed-server-cpp-restbed.yaml | 3 + bin/configs/other/openapi3/cpp-tizen.yaml | 4 + .../other/openapi3/csharp-OpenAPIClient.yaml | 5 + .../csharp-OpenAPIClientNetStandard.yaml | 6 + ...harp-OpenAPIClientWithPropertyChanged.yaml | 7 + .../csharp-dotnet2-OpenAPIClient.yaml | 5 + bin/configs/other/openapi3/elixir.yaml | 4 + bin/configs/other/openapi3/flash.yaml | 7 + .../go-gin-server-go-gin-api-server.yaml | 7 + bin/configs/other/openapi3/go-petstore.yaml | 7 + .../openapi3/go-server-go-api-server.yaml | 7 + .../graphql-nodejs-express-server.yaml | 6 + .../other/openapi3/haskell-http-client.yaml | 4 + .../other/openapi3/haskell-servant.yaml | 4 + .../openapi3/javascript-closure-angular.yaml | 3 + .../other/openapi3/jaxrs-cxf-client.yaml | 6 + .../kotlin-jvm-retrofit2-coroutines.yaml | 11 + .../openapi3/kotlin-jvm-retrofit2-rx.yaml | 11 + .../openapi3/kotlin-jvm-retrofit2-rx2.yaml | 11 + .../other/openapi3/kotlin-multiplatform.yaml | 7 + .../openapi3/kotlin-spring-boot-reactive.yaml | 10 + .../other/openapi3/kotlin-spring-boot.yaml | 10 + bin/configs/other/openapi3/kotlin.yaml | 8 + .../other/openapi3/objc-core-data.yaml | 7 + bin/configs/other/openapi3/objc-default.yaml | 6 + bin/configs/other/openapi3/php-laravel.yaml | 4 + .../php-slim-deprecated-php-slim.yaml | 4 + bin/configs/other/openapi3/php-slim4.yaml | 4 + .../php-symfony-SymfonyBundle-php.yaml | 4 + .../other/openapi3/python-flask-python2.yaml | 6 + bin/configs/other/openapi3/python-flask.yaml | 4 + bin/configs/other/openapi3/r-R.yaml | 6 + bin/configs/other/openapi3/rust.yaml | 6 + bin/configs/other/openapi3/scala-finch.yaml | 4 + .../openapi3/typescript-angular-default.yaml | 5 + .../openapi3/typescript-angular-npm.yaml | 9 + .../typescript-angular-with-interfaces.yaml | 6 + .../other/openapi3/typescript-angularjs.yaml | 3 + .../openapi3/typescript-aurelia-default.yaml | 3 + .../openapi3/typescript-fetch-default.yaml | 3 + .../openapi3/typescript-fetch-es6-target.yaml | 9 + .../typescript-fetch-with-interfaces.yaml | 5 + .../typescript-fetch-with-npm-version.yaml | 8 + .../other/openapi3/typescript-inversify.yaml | 3 + .../openapi3/typescript-jquery-default.yaml | 3 + .../other/openapi3/typescript-jquery-npm.yaml | 8 + .../openapi3/typescript-node-default.yaml | 3 + .../other/openapi3/typescript-node-npm.yaml | 8 + bin/configs/other/php-laravel.yaml | 4 + bin/configs/other/php-slim4.yaml | 4 + bin/configs/other/plantuml.yaml | 4 + bin/configs/other/powershell.yaml | 11 + bin/configs/other/protobuf-schema.yaml | 6 + bin/configs/other/ruby-on-rails.yaml | 4 + bin/configs/other/ruby-sinatra.yaml | 4 + .../other/rust-hyper-fileResponseTest.yaml | 9 + bin/configs/other/rust-hyper-petstore.yaml | 8 + bin/configs/other/rust-hyper-test.yaml | 8 + .../other/rust-reqwest-fileResponseTest.yaml | 8 + .../other/rust-reqwest-petstore-async.yaml | 8 + bin/configs/other/rust-reqwest-petstore.yaml | 8 + bin/configs/other/rust-reqwest-test.yaml | 8 + bin/configs/other/scala-akka-http-server.yaml | 3 + bin/configs/other/scala-finch.yaml | 6 + bin/configs/other/scala-gatling.yaml | 4 + ...ttpclient-deprecated-scala-httpclient.yaml | 4 + bin/configs/other/scala-lagom-server.yaml | 6 + bin/configs/other/scala-play-server.yaml | 6 + bin/configs/other/scalatra.yaml | 4 + bin/configs/other/scalaz.yaml | 6 + .../other/swift5-alamofireLibrary.yaml | 11 + bin/configs/other/swift5-combineLibrary.yaml | 11 + bin/configs/other/swift5-default.yaml | 10 + bin/configs/other/swift5-deprecated.yaml | 10 + bin/configs/other/swift5-nonPublicApi.yaml | 12 + bin/configs/other/swift5-objcCompatible.yaml | 11 + .../other/swift5-promisekitLibrary.yaml | 11 + .../other/swift5-readonlyProperties.yaml | 11 + bin/configs/other/swift5-resultLibrary.yaml | 11 + bin/configs/other/swift5-rxswiftLibrary.yaml | 11 + .../other/swift5-urlsessionLibrary.yaml | 11 + .../other/typescript-redux-query-default.yaml | 4 + bin/configs/perl-deep_module_test.yaml | 6 + bin/configs/perl.yaml | 6 + bin/configs/php-OpenAPIClient-oas2.yaml | 4 + bin/configs/php-OpenAPIClient.yaml | 4 + bin/configs/php-lumen.yaml | 4 + .../php-silex-deprecated-OpenAPIServer.yaml | 4 + bin/configs/php-slim-deprecated-php-slim.yaml | 4 + .../php-symfony-SymfonyBundle-php.yaml | 4 + bin/configs/php-ze-ph.yaml | 4 + bin/configs/python-aiohttp-srclayout.yaml | 6 + bin/configs/python-aiohttp.yaml | 4 + bin/configs/python-asyncio.yaml | 7 + bin/configs/python-blueplanet.yaml | 4 + bin/configs/python-experimental-oas2.yaml | 7 + bin/configs/python-experimental.yaml | 6 + bin/configs/python-flask-python2.yaml | 6 + bin/configs/python-flask.yaml | 4 + bin/configs/python-oas2.yaml | 6 + bin/configs/python-tornado.yaml | 7 + bin/configs/python.yaml | 6 + bin/configs/r-R.yaml | 6 + bin/configs/ruby-faraday.yaml | 10 + bin/configs/ruby.yaml | 11 + bin/configs/rust-server-multipart-v3.yaml | 8 + bin/configs/rust-server-no-example-v3.yaml | 8 + bin/configs/rust-server-openapi-v3.yaml | 8 + bin/configs/rust-server-ops-v3.yaml | 8 + ...ith-fake-endpoints-models-for-testing.yaml | 8 + bin/configs/rust-server-test.yaml | 8 + bin/configs/scala-akka.yaml | 6 + bin/configs/scala-sttp.yaml | 6 + bin/configs/spring-boot-beanvalidation.yaml | 10 + bin/configs/spring-boot-delegate-j8.yaml | 8 + bin/configs/spring-boot-delegate.yaml | 9 + bin/configs/spring-boot-implicitHeaders.yaml | 8 + bin/configs/spring-boot-reactive.yaml | 9 + bin/configs/spring-boot-useoptional.yaml | 8 + bin/configs/spring-boot-virtualan.yaml | 11 + bin/configs/spring-boot.yaml | 8 + bin/configs/spring-cloud-async.yaml | 10 + bin/configs/spring-cloud.yaml | 9 + bin/configs/spring-mvc-j8-async.yaml | 11 + bin/configs/spring-mvc-j8-localdatetime.yaml | 11 + bin/configs/spring-mvc.yaml | 11 + bin/configs/spring-stubs.yaml | 8 + .../typescript-angular-default-v6.yaml | 6 + ...t-angular-single-request-parameter-v8.yaml | 10 + ...-angular-v6-provided-in-root-with-npm.yaml | 9 + ...ypescript-angular-v6-provided-in-root.yaml | 5 + ...ular-v7-not-provided-in-root-with-npm.yaml | 11 + ...cript-angular-v7-not-provided-in-root.yaml | 6 + ...-angular-v7-provided-in-root-with-npm.yaml | 9 + ...ypescript-angular-v7-provided-in-root.yaml | 5 + .../typescript-angular-with-npm-v6.yaml | 10 + .../typescript-angular-with-npm-v8.yaml | 9 + ...-angular-with-prefixed-module-name-v8.yaml | 10 + bin/configs/typescript-angularjs.yaml | 3 + bin/configs/typescript-aurelia-default.yaml | 3 + .../typescript-axios-composed-schemas.yaml | 3 + bin/configs/typescript-axios-default.yaml | 3 + bin/configs/typescript-axios-es6-target.yaml | 9 + ...typescript-axios-with-complex-headers.yaml | 3 + .../typescript-axios-with-interfaces.yaml | 5 + ...m-version-and-separate-models-and-api.yaml | 11 + .../typescript-axios-with-npm-version.yaml | 8 + ...-axios-with-single-request-parameters.yaml | 5 + bin/configs/typescript-fetch-default.yaml | 3 + bin/configs/typescript-fetch-es6-target.yaml | 9 + .../typescript-fetch-multiple-parameters.yaml | 6 + ...ipt-fetch-prefix-parameter-interfaces.yaml | 9 + ...ypescript-fetch-typescript-three-plus.yaml | 9 + .../typescript-fetch-with-interfaces.yaml | 5 + .../typescript-fetch-with-npm-version.yaml | 8 + bin/configs/typescript-inversify.yaml | 3 + bin/configs/typescript-jquery-default.yaml | 3 + bin/configs/typescript-jquery-npm.yaml | 8 + bin/configs/typescript-node-default.yaml | 3 + bin/configs/typescript-node-npm.yaml | 8 + ...pescript-redux-query-with-npm-version.yaml | 9 + bin/configs/typescript-rxjs-default.yaml | 3 + bin/configs/typescript-rxjs-es6-target.yaml | 9 + .../typescript-rxjs-with-interfaces.yaml | 5 + .../typescript-rxjs-with-npm-version.yaml | 8 + bin/cpp-pistache-server-petstore.sh | 32 - bin/cpp-qt5-petstore.json | 8 - bin/cpp-qt5-petstore.sh | 36 -- bin/cpp-qt5-qhttpengine-server-petstore.sh | 32 - bin/cpp-restbed-petstore-server.sh | 32 - bin/cpp-restsdk-petstore.sh | 32 - bin/cpp-tizen-petstore.sh | 32 - bin/cpp-ue4-petstore.sh | 31 - bin/csharp-dotnet2-petstore.sh | 32 - bin/csharp-netcore-petstore-all.sh | 7 - bin/csharp-netcore-petstore-netcore.sh | 38 -- bin/csharp-netcore-petstore.sh | 37 -- bin/csharp-petstore-all.sh | 17 - bin/csharp-petstore-net-35.json | 3 - bin/csharp-petstore-net-35.sh | 32 - bin/csharp-petstore-net-40.json | 3 - bin/csharp-petstore-net-40.sh | 32 - bin/csharp-petstore-net-standard.json | 3 - bin/csharp-petstore-net-standard.sh | 32 - bin/csharp-petstore-netcore-project.sh | 32 - bin/csharp-petstore.sh | 37 -- bin/csharp-property-changed-petstore.sh | 32 - bin/cwiki-petstore.sh | 32 - bin/dart-dio-petstore.sh | 34 -- bin/dart-jaguar-petstore.sh | 50 -- bin/dart-petstore.sh | 51 -- bin/dart2-petstore.sh | 33 - bin/dynamic-html.sh | 32 - bin/eiffel-petstore.sh | 32 - bin/elixir-petstore.sh | 37 -- bin/erlang-petstore-client.sh | 32 - bin/erlang-petstore-proper.sh | 32 - bin/erlang-petstore-server.sh | 32 - bin/flash-petstore.json | 4 - bin/flash-petstore.sh | 32 - bin/fsharp-functions-server-petstore.sh | 31 - bin/fsharp-giraffe-server-petstore.sh | 32 - bin/generate-samples.sh | 26 + bin/go-experimental-petstore.sh | 39 -- bin/go-gin-petstore-server.sh | 40 -- bin/go-petstore-server.sh | 40 -- bin/go-petstore-withxml.sh | 39 -- bin/go-petstore.sh | 39 -- bin/graphql-nodejs-express-server.sh | 32 - bin/graphql-schema-petstore.sh | 32 - bin/groovy-petstore.sh | 31 - bin/haskell-http-client-petstore.sh | 34 -- bin/haskell-servant-petstore.sh | 32 - bin/html-markdown.sh | 32 - bin/html-petstore.sh | 32 - bin/html2-petstore.sh | 32 - bin/java-inflector-petstore-server.sh | 32 - bin/java-jaxrs-petstore-server-all.sh | 23 - bin/java-msf4j-petstore-server.sh | 35 -- bin/java-petstore-all.sh | 24 - bin/java-petstore-feign-10x.json | 4 - bin/java-petstore-feign-10x.sh | 40 -- bin/java-petstore-google-api-client.json | 4 - bin/java-petstore-google-api-client.sh | 35 -- bin/java-petstore-jersey1.sh | 47 -- bin/java-petstore-jersey2-java8.json | 5 - bin/java-petstore-jersey2-java8.sh | 48 -- bin/java-petstore-microprofile.sh | 36 -- bin/java-petstore-native-async.sh | 35 -- bin/java-petstore-native.json | 4 - bin/java-petstore-native.sh | 35 -- bin/java-petstore-okhttp-gson-parcelable.sh | 34 -- bin/java-petstore-okhttp-gson.json | 4 - bin/java-petstore-okhttp-gson.sh | 50 -- bin/java-petstore-rest-assured-jackson.json | 4 - bin/java-petstore-rest-assured-jackson.sh | 36 -- bin/java-petstore-rest-assured.json | 4 - bin/java-petstore-rest-assured.sh | 36 -- bin/java-petstore-resteasy-all.sh | 8 - bin/java-petstore-resteasy.json | 4 - bin/java-petstore-resteasy.sh | 35 -- bin/java-petstore-resttemplate-withxml.sh | 35 -- bin/java-petstore-resttemplate.json | 4 - bin/java-petstore-resttemplate.sh | 45 -- bin/java-petstore-retrofit2-all.sh | 8 - bin/java-petstore-retrofit2-play24.json | 1 - bin/java-petstore-retrofit2-play24.sh | 35 -- bin/java-petstore-retrofit2-play25.json | 1 - bin/java-petstore-retrofit2-play25.sh | 35 -- bin/java-petstore-retrofit2-play26.json | 1 - bin/java-petstore-retrofit2-play26.sh | 35 -- bin/java-petstore-retrofit2.json | 4 - bin/java-petstore-retrofit2.sh | 35 -- bin/java-petstore-retrofit2rx.json | 4 - bin/java-petstore-retrofit2rx.sh | 35 -- bin/java-petstore-retrofit2rx2.json | 4 - bin/java-petstore-retrofit2rx2.sh | 35 -- bin/java-petstore-vertx.json | 5 - bin/java-petstore-vertx.sh | 35 -- bin/java-petstore-webclient.json | 4 - bin/java-petstore-webclient.sh | 35 -- bin/java-pkmst-petstore-server.sh | 35 -- ...java-play-framework-petstore-server-all.sh | 12 - ...rk-petstore-server-api-package-override.sh | 34 -- ...-play-framework-petstore-server-async.json | 5 - ...va-play-framework-petstore-server-async.sh | 32 - ...amework-petstore-server-controller-only.sh | 34 -- ...ramework-petstore-server-fake-endpoints.sh | 34 -- ...work-petstore-server-no-bean-validation.sh | 34 -- ...k-petstore-server-no-exception-handling.sh | 34 -- ...-framework-petstore-server-no-interface.sh | 34 -- ...framework-petstore-server-no-swagger-ui.sh | 34 -- ...framework-petstore-server-no-wrap-calls.sh | 34 -- bin/java-play-framework-petstore-server.sh | 34 -- bin/java-undertow-petstore-server.sh | 32 - bin/java-vertx-async-petstore-server.sh | 32 - bin/java-vertx-rx-petstore-server.sh | 32 - bin/java-vertx-web-rx-petstore-server.sh | 37 -- bin/javascript-apollo-petstore.sh | 32 - bin/javascript-closure-angular.sh | 32 - bin/javascript-es6-petstore.sh | 34 -- bin/javascript-flowtyped-petstore.sh | 32 - bin/javascript-petstore-all.sh | 4 - bin/javascript-promise-es6-petstore.sh | 35 -- bin/jaxrs-cxf-cdi-petstore-server.sh | 32 - bin/jaxrs-cxf-client-petstore.sh | 32 - ...cxf-petstore-server-annotated-base-path.sh | 32 - ...-petstore-server-non-spring-application.sh | 32 - bin/jaxrs-cxf-petstore-server-test-data.sh | 32 - bin/jaxrs-cxf-petstore-server.sh | 35 -- bin/jaxrs-datelib-j8.json | 7 - bin/jaxrs-jersey1-petstore-server.sh | 35 -- bin/jaxrs-jersey1-usetags-petstore-server.sh | 35 -- bin/jaxrs-petstore-server-datelib-j8.sh | 32 - bin/jaxrs-petstore-server.sh | 35 -- ...rs-resteasy-eap-java8-petstore-server.json | 3 - ...axrs-resteasy-eap-java8-petstore-server.sh | 36 -- ...xrs-resteasy-eap-joda-petstore-server.json | 3 - ...jaxrs-resteasy-eap-joda-petstore-server.sh | 35 -- bin/jaxrs-resteasy-eap-petstore-server.sh | 36 -- bin/jaxrs-resteasy-joda-petstore-server.json | 3 - bin/jaxrs-resteasy-joda-petstore-server.sh | 32 - bin/jaxrs-resteasy-petstore-server.sh | 32 - ...ore-server-interface-returning-response.sh | 36 -- bin/jaxrs-spec-petstore-server-interface.sh | 35 -- bin/jaxrs-spec-petstore-server.sh | 34 -- bin/jaxrs-usetags-petstore-server.sh | 35 -- bin/jmeter-petstore.sh | 32 - bin/k6-petstore.sh | 32 - bin/kotlin-client-all.sh | 15 - bin/kotlin-client-gson.sh | 32 - bin/kotlin-client-jackson.sh | 32 - bin/kotlin-client-json-request-string.sh | 32 - bin/kotlin-client-moshi-codegen.sh | 32 - bin/kotlin-client-nonpublic.sh | 32 - bin/kotlin-client-nullable.sh | 32 - bin/kotlin-client-okhttp3.sh | 32 - bin/kotlin-client-petstore-multiplatform.sh | 32 - ...otlin-client-petstore-okhttp-coroutines.sh | 37 -- bin/kotlin-client-petstore.sh | 32 - bin/kotlin-client-retrofit2.sh | 32 - bin/kotlin-client-string.sh | 34 -- bin/kotlin-client-threetenbp.sh | 34 -- bin/kotlin-client-uppercase-enum.sh | 34 -- bin/kotlin-server-petstore.sh | 34 -- bin/kotlin-springboot-petstore-all.sh | 5 - ...pringboot-petstore-server-model-mutable.sh | 35 -- ...lin-springboot-petstore-server-reactive.sh | 35 -- bin/kotlin-springboot-petstore-server.sh | 35 -- bin/kotlin-vertx-server-petstore.sh | 31 - bin/lua-petstore.sh | 32 - bin/markdown-documentation-petstore.sh | 31 - bin/meta-codegen-kotlin.sh | 6 +- bin/meta-codegen.sh | 5 +- bin/mysql-schema-petstore.sh | 32 - bin/nancyfx-petstore-server-async.sh | 32 - bin/nancyfx-petstore-server.sh | 32 - bin/nim-client-petstore.sh | 31 - bin/nodejs-express-petstore-server.sh | 32 - bin/objc-petstore-all.sh | 8 - bin/objc-petstore-coredata.sh | 33 - bin/objc-petstore.json | 4 - bin/objc-petstore.sh | 32 - bin/ocaml-petstore.sh | 34 -- bin/openapi3/android-petstore-all.sh | 5 - bin/openapi3/android-petstore-httpclient.sh | 32 - bin/openapi3/android-petstore-volley.sh | 32 - bin/openapi3/avro-petstore.sh | 32 - bin/openapi3/bash-petstore.sh | 32 - bin/openapi3/clojure-petstore.sh | 32 - bin/openapi3/cpp-pistache-server-petstore.sh | 32 - bin/openapi3/cpp-qt5-petstore.sh | 32 - .../cpp-qt5-qhttpengine-server-petstore.sh | 32 - bin/openapi3/cpp-restbed-petstore-server.sh | 32 - bin/openapi3/cpp-tizen-petstore.sh | 32 - bin/openapi3/csharp-dotnet2-petstore.sh | 32 - bin/openapi3/csharp-petstore-net-standard.sh | 32 - bin/openapi3/csharp-petstore.sh | 32 - .../csharp-property-changed-petstore.sh | 32 - bin/openapi3/dart-petstore.sh | 51 -- bin/openapi3/elixir-petstore.sh | 37 -- bin/openapi3/elm.sh | 32 - bin/openapi3/finch-petstore-server.sh | 32 - bin/openapi3/flash-petstore.sh | 32 - bin/openapi3/go-experimental-petstore.sh | 45 -- bin/openapi3/go-gin-petstore-server.sh | 41 -- bin/openapi3/go-petstore-server.sh | 40 -- bin/openapi3/go-petstore.sh | 41 -- bin/openapi3/graphql-nodejs-express-server.sh | 32 - bin/openapi3/haskell-http-client-petstore.sh | 34 -- bin/openapi3/haskell-servant-petstore.sh | 32 - bin/openapi3/java-petstore-jersey2-java8.json | 5 - bin/openapi3/java-petstore-jersey2-java8.sh | 44 -- bin/openapi3/javascript-closure-angular.sh | 32 - bin/openapi3/jaxrs-cxf-client-petstore.sh | 32 - bin/openapi3/jaxrs-jersey-petstore.sh | 32 - bin/openapi3/kotlin-client-petstore-all.sh | 9 - .../kotlin-client-petstore-deprecated.sh | 35 -- .../kotlin-client-petstore-multiplatform.sh | 37 -- ...otlin-client-petstore-nullable-required.sh | 37 -- ...in-client-petstore-retrofit2-coroutines.sh | 37 -- .../kotlin-client-petstore-retrofit2-rx.sh | 37 -- .../kotlin-client-petstore-retrofit2-rx2.sh | 37 -- bin/openapi3/kotlin-client-petstore.sh | 37 -- .../kotlin-springboot-petstore-all.sh | 4 - ...lin-springboot-petstore-server-reactive.sh | 35 -- .../kotlin-springboot-petstore-server.sh | 35 -- bin/openapi3/objc-petstore-coredata.sh | 33 - bin/openapi3/objc-petstore.sh | 32 - bin/openapi3/perl-petstore.sh | 33 - bin/openapi3/php-laravel-petstore.sh | 42 -- bin/openapi3/php-lumen-petstore-server.sh | 32 - bin/openapi3/php-petstore.sh | 38 -- bin/openapi3/php-silex-petstore-server.sh | 32 - bin/openapi3/php-slim-server-petstore.sh | 32 - bin/openapi3/php-slim4-server-petstore.sh | 32 - bin/openapi3/php-symfony-petstore.sh | 42 -- bin/openapi3/php-ze-ph-petstore-server.sh | 36 -- .../plantuml-documentation-petstore.sh | 31 - bin/openapi3/python-experimental-petstore.sh | 34 -- bin/openapi3/python-flask-petstore-python2.sh | 50 -- bin/openapi3/python-flask-petstore.sh | 50 -- bin/openapi3/python-petstore.sh | 32 - bin/openapi3/r-petstore.sh | 32 - bin/openapi3/run-all-petstore | 34 -- bin/openapi3/rust-petstore.sh | 32 - .../typescript-angular-petstore-all.sh | 49 -- ...pescript-angular-v2-petstore-interfaces.sh | 32 - ...typescript-angular-v2-petstore-with-npm.sh | 32 - .../typescript-angular-v2-petstore.sh | 32 - ...typescript-angular-v4-petstore-with-npm.sh | 32 - ...pescript-angular-v4.3-petstore-with-npm.sh | 32 - bin/openapi3/typescript-angularjs-petstore.sh | 32 - bin/openapi3/typescript-aurelia-petstore.sh | 32 - bin/openapi3/typescript-fetch-petstore-all.sh | 7 - .../typescript-fetch-petstore-interfaces.sh | 32 - ...ch-petstore-prefix-parameter-interfaces.sh | 32 - .../typescript-fetch-petstore-target-es6.sh | 32 - ...escript-fetch-petstore-with-npm-version.sh | 32 - bin/openapi3/typescript-fetch-petstore.sh | 32 - bin/openapi3/typescript-inversify-petstore.sh | 32 - .../typescript-jquery-petstore-all.sh | 37 -- .../typescript-jquery-petstore-with-npm.sh | 32 - bin/openapi3/typescript-jquery-petstore.sh | 32 - bin/openapi3/typescript-node-petstore-all.sh | 37 -- .../typescript-node-petstore-with-npm.sh | 32 - bin/openapi3/typescript-node-petstore.sh | 32 - .../csharp-netcore-petstore-netcore.bat | 14 - .../windows/csharp-netcore-petstore.bat | 14 - bin/openapi3/windows/csharp-petstore.bat | 14 - .../windows/kotlin-client-deprecated.bat | 10 - .../kotlin-client-nullable-required.bat | 10 - .../kotlin-springboot-petstore-server.bat | 10 - .../nodejs-express-server-petstore.bat | 10 - bin/openapi3/windows/php-petstore.bat | 10 - .../plantuml-documentation-petstore.bat | 10 - .../windows/python-experimental-petstore.bat | 10 - bin/openapi3/windows/r-petstore.bat | 10 - bin/openapi3/windows/run-all-petstore.cmd | 15 - bin/openapi3/windows/scala-sttp-petstore.bat | 10 - bin/perl-deep-module-petstore.sh | 32 - bin/perl-petstore-all.sh | 5 - bin/perl-petstore.sh | 33 - bin/php-laravel-petstore-server.sh | 32 - bin/php-lumen-petstore-server.sh | 32 - bin/php-petstore.sh | 38 -- bin/php-silex-petstore-server.sh | 32 - bin/php-slim-server-petstore.sh | 32 - bin/php-slim4-server-petstore.sh | 32 - bin/php-symfony-petstore.sh | 42 -- bin/php-ze-ph-petstore-server.sh | 36 -- bin/plantuml-documentation-petstore.sh | 31 - bin/powershell-config.json | 3 - bin/powershell-petstore.sh | 32 - bin/protobuf-schema-petstore.sh | 32 - bin/python-asyncio-petstore.sh | 32 - bin/python-experimental-petstore.sh | 32 - bin/python-petstore-all.sh | 7 - bin/python-petstore.sh | 32 - bin/python-server-aiohttp-petstore.sh | 44 -- ...ython-server-aiohttp-srclayout-petstore.sh | 44 -- bin/python-server-all.sh | 7 - bin/python-server-blueplanet-petstore.sh | 44 -- bin/python-server-flask-petstore-python2.sh | 49 -- bin/python-server-flask-petstore.sh | 50 -- bin/python-tornado-petstore.sh | 32 - bin/r-petstore.sh | 32 - bin/ruby-client-petstore-faraday.sh | 43 -- bin/ruby-client-petstore.sh | 43 -- bin/ruby-on-rails-server-petstore.sh | 32 - bin/ruby-petstore-faraday.json | 6 - bin/ruby-petstore.json | 7 - bin/ruby-sinatra-server-petstore.sh | 32 - bin/run-all-petstore | 33 - bin/rust-petstore-reqwest-async.sh | 32 - bin/rust-petstore.sh | 47 -- bin/rust-server-petstore.sh | 46 -- bin/scala-akka-http-server-petstore.sh | 31 - bin/scala-akka-petstore.sh | 32 - bin/scala-finch-petstore-server.sh | 32 - bin/scala-gatling-petstore.sh | 32 - bin/scala-httpclient-petstore.sh | 32 - bin/scala-lagom-server-petstore.sh | 32 - bin/scala-play-framework-petstore.sh | 32 - bin/scala-sttp-petstore.sh | 32 - bin/scalatra-petstore-server.sh | 32 - bin/scalaz-petstore.sh | 32 - bin/spring-all-petstore.sh | 21 - bin/spring-cloud-feign-async-petstore.sh | 35 -- bin/spring-cloud-feign-petstore.json | 4 - bin/spring-cloud-feign-petstore.sh | 35 -- bin/spring-delegate-j8.sh | 35 -- bin/spring-delegate.sh | 35 -- bin/spring-mvc-petstore-j8-async-server.sh | 32 - bin/spring-mvc-petstore-j8-async.json | 6 - bin/spring-mvc-petstore-j8-localdatetime.json | 5 - bin/spring-mvc-petstore-j8-localdatetime.sh | 32 - bin/spring-mvc-petstore-server.json | 4 - bin/spring-mvc-petstore-server.sh | 32 - bin/spring-stubs.sh | 32 - ...ngboot-petstore-server-beanvalidation.json | 5 - ...ringboot-petstore-server-beanvalidation.sh | 35 -- ...gboot-petstore-server-implicitHeaders.json | 3 - ...ingboot-petstore-server-implicitHeaders.sh | 35 -- bin/springboot-petstore-server-reactive.sh | 34 -- ...pringboot-petstore-server-useOptional.json | 4 - bin/springboot-petstore-server-useOptional.sh | 35 -- bin/springboot-petstore-server.sh | 35 -- bin/springboot-virtualan-petstore-server.json | 7 - bin/springboot-virtualan-petstore-server.sh | 35 -- bin/supportPython2.json | 3 - bin/swift5-all.sh | 4 - bin/swift5-petstore-alamofire.json | 7 - bin/swift5-petstore-alamofire.sh | 42 -- bin/swift5-petstore-all.sh | 13 - bin/swift5-petstore-combine.json | 7 - bin/swift5-petstore-combine.sh | 42 -- bin/swift5-petstore-deprecated.json | 6 - bin/swift5-petstore-deprecated.sh | 42 -- bin/swift5-petstore-nonPublicApi.json | 8 - bin/swift5-petstore-nonPublicApi.sh | 42 -- bin/swift5-petstore-objcCompatible.json | 7 - bin/swift5-petstore-objcCompatible.sh | 42 -- bin/swift5-petstore-promisekit.json | 7 - bin/swift5-petstore-promisekit.sh | 42 -- bin/swift5-petstore-readOnlyProperties.sh | 42 -- bin/swift5-petstore-readonlyProperties.json | 7 - bin/swift5-petstore-result.json | 7 - bin/swift5-petstore-result.sh | 42 -- bin/swift5-petstore-rxswift.json | 7 - bin/swift5-petstore-rxswift.sh | 42 -- bin/swift5-petstore-urlsession.json | 7 - bin/swift5-petstore-urlsession.sh | 42 -- bin/swift5-petstore.json | 6 - bin/swift5-petstore.sh | 42 -- bin/swift5-test.json | 6 - bin/swift5-test.sh | 42 -- bin/typescript-angular-petstore-all.sh | 13 - ...etstore-not-provided-in-root-with-npm.json | 6 - ...-petstore-not-provided-in-root-with-npm.sh | 32 - ...ngular-v6-petstore-not-provided-in-root.sh | 32 - ...v6-petstore-provided-in-root-with-npm.json | 6 - ...r-v6-petstore-provided-in-root-with-npm.sh | 32 - ...pt-angular-v6-petstore-provided-in-root.sh | 32 - ...etstore-not-provided-in-root-with-npm.json | 7 - ...-petstore-not-provided-in-root-with-npm.sh | 32 - ...ngular-v7-petstore-not-provided-in-root.sh | 32 - ...v7-petstore-provided-in-root-with-npm.json | 6 - ...r-v7-petstore-provided-in-root-with-npm.sh | 32 - ...pt-angular-v7-petstore-provided-in-root.sh | 32 - ...v8-petstore-provided-in-root-with-npm.json | 7 - ...r-v8-petstore-provided-in-root-with-npm.sh | 32 - ...vided-in-root-with-prefixed-module-name.sh | 32 - ...ar-v8-petstore-single-request-parameter.sh | 32 - bin/typescript-angularjs-petstore.sh | 32 - bin/typescript-aurelia-petstore.sh | 32 - bin/typescript-axios-petstore-all.sh | 10 - ...escript-axios-petstore-composed-schemas.sh | 32 - bin/typescript-axios-petstore-interfaces.sh | 32 - bin/typescript-axios-petstore-target-es6.json | 7 - bin/typescript-axios-petstore-target-es6.sh | 32 - ...ipt-axios-petstore-with-complex-headers.sh | 32 - ...m-version-and-separate-models-and-api.json | 9 - ...npm-version-and-separate-models-and-api.sh | 32 - ...cript-axios-petstore-with-npm-version.json | 6 - ...escript-axios-petstore-with-npm-version.sh | 32 - ...petstore-with-single-request-parameters.sh | 32 - bin/typescript-axios-petstore.sh | 32 - bin/typescript-fetch-petstore-all.sh | 9 - bin/typescript-fetch-petstore-interfaces.sh | 32 - ...pt-fetch-petstore-multiple-parameters.json | 4 - ...ript-fetch-petstore-multiple-parameters.sh | 34 -- ...-petstore-prefix-parameter-interfaces.json | 7 - ...ch-petstore-prefix-parameter-interfaces.sh | 34 -- bin/typescript-fetch-petstore-target-es6.json | 7 - bin/typescript-fetch-petstore-target-es6.sh | 34 -- ...-fetch-petstore-typescript-three-plus.json | 7 - ...pt-fetch-petstore-typescript-three-plus.sh | 32 - ...cript-fetch-petstore-with-npm-version.json | 6 - ...escript-fetch-petstore-with-npm-version.sh | 34 -- bin/typescript-fetch-petstore.sh | 34 -- bin/typescript-inversify-petstore.sh | 32 - bin/typescript-jquery-petstore-all.sh | 4 - bin/typescript-jquery-petstore-npm.json | 6 - bin/typescript-jquery-petstore-with-npm.sh | 32 - bin/typescript-jquery-petstore.sh | 32 - bin/typescript-node-petstore-all.sh | 4 - bin/typescript-node-petstore-npm.json | 6 - bin/typescript-node-petstore-with-npm.sh | 32 - bin/typescript-node-petstore.sh | 32 - bin/typescript-petstore-npm.json | 6 - ...redux-query-petstore-with-npm-version.json | 6 - ...t-redux-query-petstore-with-npm-version.sh | 32 - bin/typescript-redux-query-petstore.sh | 32 - bin/typescript-rxjs-petstore-all.sh | 6 - bin/typescript-rxjs-petstore-interfaces.sh | 32 - bin/typescript-rxjs-petstore-target-es6.json | 7 - bin/typescript-rxjs-petstore-target-es6.sh | 32 - ...script-rxjs-petstore-with-npm-version.json | 6 - ...pescript-rxjs-petstore-with-npm-version.sh | 32 - bin/typescript-rxjs-petstore.sh | 32 - bin/utils/ensure-up-to-date | 103 +--- bin/windows/android-petstore-all.bat | 2 - bin/windows/android-petstore-httpclient.bat | 10 - bin/windows/android-petstore-volley.bat | 10 - bin/windows/android-petstore.bat | 10 - bin/windows/apache2-petstore-config.bat | 10 - bin/windows/apex-petstore.bat | 10 - .../asciidoc-documentation-petstore.bat | 10 - bin/windows/aspnetcore-petstore-server.bat | 10 - bin/windows/aspnetcore3-petstore-server.bat | 10 - bin/windows/c-petstore.bat | 10 - bin/windows/clojure-petstore.bat | 10 - bin/windows/cpp-pistache-server-petstore.bat | 10 - bin/windows/cpp-qt5-petstore.bat | 10 - .../cpp-qt5-qhttpengine-server-petstore.bat | 10 - bin/windows/cpp-restbed-petstore-server.bat | 10 - bin/windows/cpp-restsdk-petstore.bat | 10 - bin/windows/cpp-tizen-petstore.bat | 10 - bin/windows/cpp-ue4-petstore.bat | 10 - bin/windows/csharp-dotnet2-petstore.bat | 10 - bin/windows/csharp-netcore-petstore-all.bat | 7 - .../csharp-netcore-petstore-netcore.bat | 15 - bin/windows/csharp-netcore-petstore.bat | 15 - bin/windows/csharp-petstore-all.bat | 18 - bin/windows/csharp-petstore-net-35.bat | 10 - bin/windows/csharp-petstore-net-40.bat | 10 - .../csharp-petstore-netcore-project.bat | 10 - bin/windows/csharp-petstore-netstandard.bat | 10 - bin/windows/csharp-petstore.bat | 15 - .../csharp-property-changed-petstore.bat | 10 - bin/windows/dart-client-petstore.bat | 12 - bin/windows/dart-dio-petstore.bat | 10 - bin/windows/dart-petstore.bat | 15 - bin/windows/dynamic-html-petstore.bat | 10 - bin/windows/eiffel-petstore.bat | 10 - bin/windows/elm-petstore.bat | 10 - bin/windows/erlang-petstore-client.bat | 10 - bin/windows/erlang-petstore-server.bat | 10 - bin/windows/flash-petstore.bat | 10 - .../fsharp-functions-server-petstore.bat | 10 - .../fsharp-giraffe-server-petstore.bat | 10 - bin/windows/go-experimental-petstore.bat | 21 - bin/windows/go-gin-petstore-server.bat | 21 - bin/windows/go-petstore-server.bat | 21 - bin/windows/go-petstore-withxml.bat | 21 - bin/windows/go-petstore.bat | 21 - ...graphql-nodejs-express-petstore-server.bat | 10 - bin/windows/graphql-schema-petstore.bat | 10 - bin/windows/groovy-petstore.bat | 10 - bin/windows/haskell-http-client-petstore.bat | 10 - bin/windows/html-petstore.bat | 10 - bin/windows/html2-petstore.bat | 10 - bin/windows/java-petstore-all.bat | 20 - bin/windows/java-petstore-feign-10x.bat | 10 - .../java-petstore-google-api-client.bat | 10 - bin/windows/java-petstore-jersey1.bat | 10 - bin/windows/java-petstore-jersey2-java8.bat | 10 - bin/windows/java-petstore-microprofile.bat | 10 - bin/windows/java-petstore-native.bat | 10 - .../java-petstore-okhttp-gson-parcelable.bat | 10 - bin/windows/java-petstore-okhttp-gson.bat | 10 - .../java-petstore-rest-assured-jackson.bat | 10 - bin/windows/java-petstore-rest-assured.bat | 10 - .../java-petstore-resttemplate-resteasy.bat | 10 - .../java-petstore-resttemplate-webclient.bat | 10 - .../java-petstore-resttemplate-withxml.bat | 10 - bin/windows/java-petstore-resttemplate.bat | 10 - bin/windows/java-petstore-retrofit2-all.bat | 6 - .../java-petstore-retrofit2-play24.bat | 10 - .../java-petstore-retrofit2-play25.bat | 10 - .../java-petstore-retrofit2-play26.bat | 10 - bin/windows/java-petstore-retrofit2.bat | 10 - bin/windows/java-petstore-retrofit2rx.bat | 10 - bin/windows/java-petstore-retrofit2rx2.bat | 10 - bin/windows/java-petstore-vertx.bat | 10 - bin/windows/java-petstore-webclient.bat | 10 - bin/windows/java-pkmst-petstore-server.bat | 10 - .../java-play-framework-petstore-server.bat | 10 - .../java-vertx-async-petstore-server.bat | 10 - bin/windows/java-vertx-rx-petstore-server.bat | 10 - bin/windows/javascript-apollo-petstore.bat | 10 - bin/windows/javascript-es6-petstore.bat | 10 - bin/windows/javascript-petstore-all.bat | 2 - .../javascript-promise-es6-petstore.bat | 10 - bin/windows/javascript-promise-petstore.bat | 10 - bin/windows/jaxrs-cxf-cdi-petstore-server.bat | 10 - bin/windows/jaxrs-cxf-client-petstore.bat | 10 - ...xf-petstore-server-annotated-base-path.bat | 10 - ...petstore-server-non-spring-application.bat | 10 - .../jaxrs-cxf-petstore-server-test-data.bat | 10 - bin/windows/jaxrs-cxf-petstore-server.bat | 10 - .../jaxrs-spec-petstore-server-interface.bat | 10 - bin/windows/jaxrs-spec-petstore-server.bat | 10 - bin/windows/k6-petstore.bat | 10 - bin/windows/kotlin-client-all.bat | 11 - bin/windows/kotlin-client-gson.bat | 10 - .../kotlin-client-json-request-string.bat | 10 - bin/windows/kotlin-client-moshi-codegen.bat | 10 - bin/windows/kotlin-client-nonpublic.bat | 10 - bin/windows/kotlin-client-nullable.bat | 10 - bin/windows/kotlin-client-okhttp3.bat | 10 - .../kotlin-client-petstore-multiplatform.bat | 10 - bin/windows/kotlin-client-petstore.bat | 10 - bin/windows/kotlin-client-retrofit2.bat | 10 - bin/windows/kotlin-client-string.bat | 10 - bin/windows/kotlin-client-threetenbp.bat | 10 - bin/windows/kotlin-server-petstore.bat | 10 - .../kotlin-springboot-petstore-server.bat | 10 - bin/windows/kotlin-vertx-server-petstore.bat | 10 - bin/windows/lua-petstore.bat | 10 - .../markdown-documentation-petstore.bat | 10 - bin/windows/mysql-schema-petstore.bat | 10 - bin/windows/nancyfx-petstore-server.bat | 10 - bin/windows/nim-client-petstore.bat | 10 - bin/windows/objc-petstore.bat | 10 - bin/windows/ocaml-petstore.bat | 10 - bin/windows/perl-petstore.bat | 10 - bin/windows/php-lumen-petstore-server.bat | 10 - bin/windows/php-petstore.bat | 10 - bin/windows/php-silex-petstore-server.bat | 10 - bin/windows/php-slim-server-petstore.bat | 10 - bin/windows/php-slim4-server-petstore.bat | 10 - bin/windows/php-symfony-petstore-server.bat | 10 - bin/windows/php-ze-ph-petstore-server.bat | 10 - .../plantuml-documentation-petstore.bat | 10 - bin/windows/powershell-petstore.bat | 10 - bin/windows/protobuf-schema-petstore.bat | 10 - bin/windows/python-experimental-petstore.bat | 10 - bin/windows/python-petstore.bat | 10 - bin/windows/python2-flask-petstore.bat | 10 - bin/windows/python3-flask-petstore.bat | 10 - bin/windows/r-petstore.bat | 10 - bin/windows/rails5-petstore-server.bat | 10 - bin/windows/ruby-client-petstore.bat | 10 - bin/windows/run-all-petstore.cmd | 15 - bin/windows/rust-petstore.bat | 10 - bin/windows/rust-server-petstore.bat | 10 - .../scala-akka-http-server-petstore.bat | 10 - bin/windows/scala-akka-petstore.bat | 10 - bin/windows/scala-gatling-petstore.sh | 10 - bin/windows/scala-httpclient-petstore.bat | 10 - bin/windows/scala-lagom-petstore.bat | 10 - bin/windows/scala-play-framework-petstore.bat | 10 - .../spring-mvc-petstore-j8-async-server.bat | 10 - bin/windows/spring-mvc-petstore-server.bat | 10 - bin/windows/springboot-petstore-server.bat | 10 - bin/windows/swift5-all.bat | 2 - bin/windows/swift5-petstore-alamofire.bat | 10 - bin/windows/swift5-petstore-all.bat | 10 - bin/windows/swift5-petstore-combine.bat | 10 - bin/windows/swift5-petstore-nonPublicApi.bat | 10 - .../swift5-petstore-objcCompatible.bat | 10 - bin/windows/swift5-petstore-promisekit.bat | 10 - .../swift5-petstore-readonlyProperties.bat | 10 - bin/windows/swift5-petstore-result.bat | 10 - bin/windows/swift5-petstore-rxswift.bat | 10 - bin/windows/swift5-petstore-urlSession.bat | 10 - bin/windows/swift5-petstore.bat | 10 - bin/windows/swift5-test.bat | 10 - .../typescript-angular-petstore-all.bat | 11 - ...gular-v6-not-provided-in-root-with-npm.bat | 10 - ...script-angular-v6-not-provided-in-root.bat | 10 - ...t-angular-v6-provided-in-root-with-npm.bat | 9 - ...typescript-angular-v6-provided-in-root.bat | 9 - ...gular-v7-not-provided-in-root-with-npm.bat | 10 - ...script-angular-v7-not-provided-in-root.bat | 10 - ...t-angular-v7-provided-in-root-with-npm.bat | 9 - ...typescript-angular-v7-provided-in-root.bat | 9 - ...ided-in-root-with-prefixed-module-name.bat | 10 - ...t-angular-v8-provided-in-root-with-npm.bat | 9 - ...pt-angular-v8-single-request-parameter.bat | 10 - bin/windows/typescript-angularjs.bat | 10 - bin/windows/typescript-aurelia-petstore.bat | 10 - bin/windows/typescript-axios-petstore-all.bat | 10 - ...script-axios-petstore-composed-schemas.bat | 14 - .../typescript-axios-petstore-interfaces.bat | 12 - .../typescript-axios-petstore-target-es6.bat | 12 - ...pt-axios-petstore-with-complex-headers.bat | 12 - ...pm-version-and-separate-models-and-api.bat | 12 - ...script-axios-petstore-with-npm-version.bat | 12 - ...etstore-with-single-request-parameters.bat | 12 - bin/windows/typescript-axios-petstore.bat | 14 - bin/windows/typescript-fetch-petstore-all.bat | 9 - .../typescript-fetch-petstore-interfaces.bat | 12 - ...ipt-fetch-petstore-multiple-parameters.bat | 12 - ...h-petstore-prefix-parameter-interfaces.bat | 12 - .../typescript-fetch-petstore-target-es6.bat | 12 - ...t-fetch-petstore-typescript-three-plus.bat | 12 - ...script-fetch-petstore-with-npm-version.bat | 12 - bin/windows/typescript-fetch-petstore.bat | 14 - bin/windows/typescript-inversify-petstore.bat | 10 - bin/windows/typescript-jquery-with-npm.bat | 10 - bin/windows/typescript-jquery.bat | 10 - bin/windows/typescript-node-petstore-all.bat | 2 - .../typescript-node-petstore-with-npm.bat | 10 - bin/windows/typescript-node-petstore.bat | 10 - ...pescript-redux-query-petstore-with-npm.bat | 10 - .../typescript-redux-query-petstore.bat | 14 - bin/windows/typescript-rxjs-petstore-all.bat | 6 - .../typescript-rxjs-petstore-interfaces.bat | 12 - .../typescript-rxjs-petstore-target-es6.bat | 12 - ...escript-rxjs-petstore-with-npm-version.bat | 12 - bin/windows/typescript-rxjs-petstore.bat | 14 - bin/windows/ze-ph-petstore.bat | 10 - .../codegen/cmd/GenerateBatch.java | 24 +- .../codegen/config/WorkflowSettings.java | 29 + .../codegen/config/CodegenConfigurator.java | 52 +- .../languages/AbstractJavaCodegen.java | 2 + .../src/test/resources/3_0/elm.yaml | 6 +- .../petstore/apex/.openapi-generator/FILES | 4 + samples/client/petstore/apex/README.md | 2 + .../main/default/classes/OASInlineObject.cls | 52 ++ .../classes/OASInlineObject.cls-meta.xml | 5 + .../main/default/classes/OASInlineObject1.cls | 52 ++ .../classes/OASInlineObject1.cls-meta.xml | 5 + .../default/classes/OASInlineObject1Test.cls | 71 +++ .../classes/OASInlineObject1Test.cls-meta.xml | 5 + .../default/classes/OASInlineObjectTest.cls | 71 +++ .../classes/OASInlineObjectTest.cls-meta.xml | 5 + .../OpenAPIClient/.openapi-generator-ignore | 25 +- .../.openapi-generator-ignore | 25 +- .../OpenAPIClient/.openapi-generator-ignore | 23 +- .../OpenAPIClient/.openapi-generator/FILES | 1 - .../openapi/.openapi-generator/FILES | 4 + .../dart/flutter_petstore/openapi/README.md | 7 +- .../flutter_petstore/openapi/doc/PetApi.md | 26 +- .../flutter_petstore/openapi/doc/StoreApi.md | 10 +- .../flutter_petstore/openapi/doc/UserApi.md | 76 ++- .../flutter_petstore/openapi/lib/api.dart | 2 + .../openapi/lib/api/pet_api.dart | 22 +- .../openapi/lib/api/store_api.dart | 10 +- .../openapi/lib/api/user_api.dart | 52 +- .../openapi/lib/api_client.dart | 4 + .../go-petstore/.openapi-generator/FILES | 1 - .../.openapi-generator/FILES | 1 - .../go/go-petstore/.openapi-generator/FILES | 1 - .../java/feign10x/.openapi-generator-ignore | 23 +- .../java/feign10x/.openapi-generator/FILES | 1 - .../.openapi-generator/FILES | 1 - .../java/jersey1/.openapi-generator-ignore | 28 +- .../java/jersey1/.openapi-generator/FILES | 1 - .../jersey2-java8/.openapi-generator-ignore | 25 +- .../jersey2-java8/.openapi-generator/FILES | 1 - .../.openapi-generator/FILES | 1 - .../java/native/.openapi-generator/FILES | 1 - .../.openapi-generator/FILES | 1 - .../okhttp-gson/.openapi-generator-ignore | 32 +- .../java/okhttp-gson/.openapi-generator/FILES | 1 - .../.openapi-generator/FILES | 53 -- .../rest-assured/.openapi-generator/FILES | 1 - .../java/resteasy/.openapi-generator/FILES | 1 - .../.openapi-generator/FILES | 1 - .../resttemplate/.openapi-generator-ignore | 27 +- .../resttemplate/.openapi-generator/FILES | 1 - .../retrofit2-play24/.openapi-generator/FILES | 1 - .../retrofit2-play25/.openapi-generator/FILES | 1 - .../retrofit2-play26/.openapi-generator/FILES | 1 - .../java/retrofit2/.openapi-generator/FILES | 1 - .../java/retrofit2rx/.openapi-generator/FILES | 1 - .../retrofit2rx2/.openapi-generator/FILES | 1 - .../java/vertx/.openapi-generator/FILES | 1 - .../java/webclient/.openapi-generator/FILES | 1 - .../.openapi-generator/FILES | 1 - .../kotlin-string/.openapi-generator-ignore | 22 +- .../.openapi-generator-ignore | 22 +- .../.openapi-generator/FILES | 54 -- .../ruby-faraday/.openapi-generator/FILES | 62 +- .../client/petstore/ruby-faraday/README.md | 6 + .../ruby-faraday/docs/InlineObject.md | 19 + .../ruby-faraday/docs/InlineObject1.md | 19 + .../ruby-faraday/docs/InlineObject2.md | 19 + .../ruby-faraday/docs/InlineObject3.md | 43 ++ .../ruby-faraday/docs/InlineObject4.md | 19 + .../ruby-faraday/docs/InlineObject5.md | 19 + .../petstore/ruby-faraday/lib/petstore.rb | 6 + .../lib/petstore/models/inline_object.rb | 217 +++++++ .../lib/petstore/models/inline_object1.rb | 217 +++++++ .../lib/petstore/models/inline_object2.rb | 255 ++++++++ .../lib/petstore/models/inline_object3.rb | 538 +++++++++++++++++ .../lib/petstore/models/inline_object4.rb | 227 +++++++ .../lib/petstore/models/inline_object5.rb | 222 +++++++ .../spec/models/inline_object1_spec.rb | 47 ++ .../spec/models/inline_object2_spec.rb | 55 ++ .../spec/models/inline_object3_spec.rb | 119 ++++ .../spec/models/inline_object4_spec.rb | 47 ++ .../spec/models/inline_object5_spec.rb | 47 ++ .../spec/models/inline_object_spec.rb | 47 ++ .../petstore/ruby/.openapi-generator/FILES | 62 +- samples/client/petstore/ruby/README.md | 6 + .../client/petstore/ruby/docs/InlineObject.md | 19 + .../petstore/ruby/docs/InlineObject1.md | 19 + .../petstore/ruby/docs/InlineObject2.md | 19 + .../petstore/ruby/docs/InlineObject3.md | 43 ++ .../petstore/ruby/docs/InlineObject4.md | 19 + .../petstore/ruby/docs/InlineObject5.md | 19 + samples/client/petstore/ruby/lib/petstore.rb | 6 + .../ruby/lib/petstore/models/inline_object.rb | 217 +++++++ .../lib/petstore/models/inline_object1.rb | 217 +++++++ .../lib/petstore/models/inline_object2.rb | 255 ++++++++ .../lib/petstore/models/inline_object3.rb | 538 +++++++++++++++++ .../lib/petstore/models/inline_object4.rb | 227 +++++++ .../lib/petstore/models/inline_object5.rb | 222 +++++++ .../ruby/spec/models/inline_object1_spec.rb | 47 ++ .../ruby/spec/models/inline_object2_spec.rb | 55 ++ .../ruby/spec/models/inline_object3_spec.rb | 119 ++++ .../ruby/spec/models/inline_object4_spec.rb | 47 ++ .../ruby/spec/models/inline_object5_spec.rb | 47 ++ .../ruby/spec/models/inline_object_spec.rb | 47 ++ samples/client/petstore/scala-sttp/README.md | 8 +- samples/client/petstore/scala-sttp/build.sbt | 2 +- .../.openapi-generator/FILES | 1 - .../spring-cloud/.openapi-generator/FILES | 1 - .../swift5/alamofireLibrary/Package.swift | 8 +- .../Classes/OpenAPIs/APIHelper.swift | 17 +- .../Classes/OpenAPIs/APIs.swift | 14 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 4 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 56 +- .../APIs/FakeClassnameTags123API.swift | 4 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 48 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 26 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 36 +- .../OpenAPIs/AlamofireImplementations.swift | 55 +- .../Classes/OpenAPIs/CodableHelper.swift | 2 +- .../Classes/OpenAPIs/Configuration.swift | 6 +- .../Classes/OpenAPIs/Extensions.swift | 20 +- .../Classes/OpenAPIs/JSONDataEncoding.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 8 +- .../Classes/OpenAPIs/Models.swift | 7 +- .../Models/AdditionalPropertiesClass.swift | 12 +- .../Classes/OpenAPIs/Models/Animal.swift | 4 +- .../Classes/OpenAPIs/Models/AnimalFarm.swift | 1 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 4 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 6 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 6 +- .../OpenAPIs/Models/Capitalization.swift | 6 +- .../Classes/OpenAPIs/Models/Cat.swift | 4 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/Category.swift | 4 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 3 +- .../Classes/OpenAPIs/Models/Client.swift | 4 +- .../Classes/OpenAPIs/Models/Dog.swift | 4 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 6 +- .../Classes/OpenAPIs/Models/EnumClass.swift | 1 + .../Classes/OpenAPIs/Models/EnumTest.swift | 6 +- .../Classes/OpenAPIs/Models/File.swift | 3 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 4 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 4 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 4 +- .../Classes/OpenAPIs/Models/List.swift | 6 +- .../Classes/OpenAPIs/Models/MapTest.swift | 14 +- ...opertiesAndAdditionalPropertiesClass.swift | 8 +- .../OpenAPIs/Models/Model200Response.swift | 5 +- .../Classes/OpenAPIs/Models/Name.swift | 5 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/Order.swift | 4 +- .../OpenAPIs/Models/OuterComposite.swift | 6 +- .../Classes/OpenAPIs/Models/OuterEnum.swift | 1 + .../Classes/OpenAPIs/Models/Pet.swift | 4 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 4 +- .../Classes/OpenAPIs/Models/Return.swift | 5 +- .../OpenAPIs/Models/SpecialModelName.swift | 6 +- .../OpenAPIs/Models/StringBooleanMap.swift | 8 +- .../Classes/OpenAPIs/Models/Tag.swift | 4 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 6 +- .../OpenAPIs/Models/TypeHolderExample.swift | 6 +- .../Classes/OpenAPIs/Models/User.swift | 4 +- .../swift5/combineLibrary/Package.swift | 4 +- .../Classes/OpenAPIs/APIHelper.swift | 17 +- .../Classes/OpenAPIs/APIs.swift | 14 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 + .../Classes/OpenAPIs/APIs/FakeAPI.swift | 34 +- .../APIs/FakeClassnameTags123API.swift | 2 + .../Classes/OpenAPIs/APIs/PetAPI.swift | 30 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 22 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 20 +- .../Classes/OpenAPIs/CodableHelper.swift | 2 +- .../Classes/OpenAPIs/Configuration.swift | 6 +- .../Classes/OpenAPIs/Extensions.swift | 20 +- .../Classes/OpenAPIs/JSONDataEncoding.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 8 +- .../Classes/OpenAPIs/Models.swift | 7 +- .../Models/AdditionalPropertiesClass.swift | 12 +- .../Classes/OpenAPIs/Models/Animal.swift | 4 +- .../Classes/OpenAPIs/Models/AnimalFarm.swift | 1 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 4 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 6 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 6 +- .../OpenAPIs/Models/Capitalization.swift | 6 +- .../Classes/OpenAPIs/Models/Cat.swift | 4 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/Category.swift | 4 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 3 +- .../Classes/OpenAPIs/Models/Client.swift | 4 +- .../Classes/OpenAPIs/Models/Dog.swift | 4 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 6 +- .../Classes/OpenAPIs/Models/EnumClass.swift | 1 + .../Classes/OpenAPIs/Models/EnumTest.swift | 6 +- .../Classes/OpenAPIs/Models/File.swift | 3 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 4 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 4 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 4 +- .../Classes/OpenAPIs/Models/List.swift | 6 +- .../Classes/OpenAPIs/Models/MapTest.swift | 14 +- ...opertiesAndAdditionalPropertiesClass.swift | 8 +- .../OpenAPIs/Models/Model200Response.swift | 5 +- .../Classes/OpenAPIs/Models/Name.swift | 5 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/Order.swift | 4 +- .../OpenAPIs/Models/OuterComposite.swift | 6 +- .../Classes/OpenAPIs/Models/OuterEnum.swift | 1 + .../Classes/OpenAPIs/Models/Pet.swift | 4 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 4 +- .../Classes/OpenAPIs/Models/Return.swift | 5 +- .../OpenAPIs/Models/SpecialModelName.swift | 6 +- .../OpenAPIs/Models/StringBooleanMap.swift | 8 +- .../Classes/OpenAPIs/Models/Tag.swift | 4 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 6 +- .../OpenAPIs/Models/TypeHolderExample.swift | 6 +- .../Classes/OpenAPIs/Models/User.swift | 4 +- .../OpenAPIs/URLSessionImplementations.swift | 168 +++--- .../petstore/swift5/default/Package.swift | 4 +- .../Classes/OpenAPIs/APIHelper.swift | 17 +- .../Classes/OpenAPIs/APIs.swift | 14 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 4 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 56 +- .../APIs/FakeClassnameTags123API.swift | 4 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 48 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 26 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 36 +- .../Classes/OpenAPIs/CodableHelper.swift | 2 +- .../Classes/OpenAPIs/Configuration.swift | 6 +- .../Classes/OpenAPIs/Extensions.swift | 20 +- .../Classes/OpenAPIs/JSONDataEncoding.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 8 +- .../Classes/OpenAPIs/Models.swift | 7 +- .../Models/AdditionalPropertiesClass.swift | 12 +- .../Classes/OpenAPIs/Models/Animal.swift | 4 +- .../Classes/OpenAPIs/Models/AnimalFarm.swift | 1 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 4 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 6 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 6 +- .../OpenAPIs/Models/Capitalization.swift | 6 +- .../Classes/OpenAPIs/Models/Cat.swift | 4 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/Category.swift | 4 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 3 +- .../Classes/OpenAPIs/Models/Client.swift | 4 +- .../Classes/OpenAPIs/Models/Dog.swift | 4 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 6 +- .../Classes/OpenAPIs/Models/EnumClass.swift | 1 + .../Classes/OpenAPIs/Models/EnumTest.swift | 6 +- .../Classes/OpenAPIs/Models/File.swift | 3 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 4 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 4 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 4 +- .../Classes/OpenAPIs/Models/List.swift | 6 +- .../Classes/OpenAPIs/Models/MapTest.swift | 14 +- ...opertiesAndAdditionalPropertiesClass.swift | 8 +- .../OpenAPIs/Models/Model200Response.swift | 5 +- .../Classes/OpenAPIs/Models/Name.swift | 5 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/Order.swift | 4 +- .../OpenAPIs/Models/OuterComposite.swift | 6 +- .../Classes/OpenAPIs/Models/OuterEnum.swift | 1 + .../Classes/OpenAPIs/Models/Pet.swift | 4 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 4 +- .../Classes/OpenAPIs/Models/Return.swift | 5 +- .../OpenAPIs/Models/SpecialModelName.swift | 6 +- .../OpenAPIs/Models/StringBooleanMap.swift | 8 +- .../Classes/OpenAPIs/Models/Tag.swift | 4 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 6 +- .../OpenAPIs/Models/TypeHolderExample.swift | 6 +- .../Classes/OpenAPIs/Models/User.swift | 4 +- .../OpenAPIs/URLSessionImplementations.swift | 168 +++--- .../petstore/swift5/deprecated/Package.swift | 4 +- .../Classes/OpenAPIs/APIHelper.swift | 17 +- .../Classes/OpenAPIs/APIs.swift | 14 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 42 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 26 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 36 +- .../Classes/OpenAPIs/CodableHelper.swift | 2 +- .../Classes/OpenAPIs/Configuration.swift | 6 +- .../Classes/OpenAPIs/Extensions.swift | 20 +- .../Classes/OpenAPIs/JSONDataEncoding.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 8 +- .../Classes/OpenAPIs/Models.swift | 7 +- .../Classes/OpenAPIs/Models/ApiResponse.swift | 3 +- .../Classes/OpenAPIs/Models/Category.swift | 3 +- .../OpenAPIs/Models/InlineObject.swift | 4 +- .../OpenAPIs/Models/InlineObject1.swift | 4 +- .../Classes/OpenAPIs/Models/Order.swift | 3 +- .../Classes/OpenAPIs/Models/Pet.swift | 5 +- .../Classes/OpenAPIs/Models/Tag.swift | 3 +- .../Classes/OpenAPIs/Models/User.swift | 3 +- .../OpenAPIs/URLSessionImplementations.swift | 168 +++--- .../swift5/nonPublicApi/Package.swift | 4 +- .../Classes/OpenAPIs/APIHelper.swift | 17 +- .../Classes/OpenAPIs/APIs.swift | 14 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 4 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 56 +- .../APIs/FakeClassnameTags123API.swift | 4 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 48 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 26 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 36 +- .../Classes/OpenAPIs/CodableHelper.swift | 2 +- .../Classes/OpenAPIs/Configuration.swift | 6 +- .../Classes/OpenAPIs/Extensions.swift | 20 +- .../Classes/OpenAPIs/JSONDataEncoding.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 8 +- .../Classes/OpenAPIs/Models.swift | 7 +- .../Models/AdditionalPropertiesClass.swift | 12 +- .../Classes/OpenAPIs/Models/Animal.swift | 4 +- .../Classes/OpenAPIs/Models/AnimalFarm.swift | 1 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 4 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 6 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 6 +- .../OpenAPIs/Models/Capitalization.swift | 6 +- .../Classes/OpenAPIs/Models/Cat.swift | 4 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/Category.swift | 4 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 3 +- .../Classes/OpenAPIs/Models/Client.swift | 4 +- .../Classes/OpenAPIs/Models/Dog.swift | 4 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 6 +- .../Classes/OpenAPIs/Models/EnumClass.swift | 1 + .../Classes/OpenAPIs/Models/EnumTest.swift | 6 +- .../Classes/OpenAPIs/Models/File.swift | 3 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 4 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 4 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 4 +- .../Classes/OpenAPIs/Models/List.swift | 6 +- .../Classes/OpenAPIs/Models/MapTest.swift | 14 +- ...opertiesAndAdditionalPropertiesClass.swift | 8 +- .../OpenAPIs/Models/Model200Response.swift | 5 +- .../Classes/OpenAPIs/Models/Name.swift | 5 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/Order.swift | 4 +- .../OpenAPIs/Models/OuterComposite.swift | 6 +- .../Classes/OpenAPIs/Models/OuterEnum.swift | 1 + .../Classes/OpenAPIs/Models/Pet.swift | 4 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 4 +- .../Classes/OpenAPIs/Models/Return.swift | 5 +- .../OpenAPIs/Models/SpecialModelName.swift | 6 +- .../OpenAPIs/Models/StringBooleanMap.swift | 8 +- .../Classes/OpenAPIs/Models/Tag.swift | 4 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 6 +- .../OpenAPIs/Models/TypeHolderExample.swift | 6 +- .../Classes/OpenAPIs/Models/User.swift | 4 +- .../OpenAPIs/URLSessionImplementations.swift | 168 +++--- .../swift5/objcCompatible/Package.swift | 4 +- .../Classes/OpenAPIs/APIHelper.swift | 17 +- .../Classes/OpenAPIs/APIs.swift | 14 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 6 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 58 +- .../APIs/FakeClassnameTags123API.swift | 6 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 50 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 28 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 38 +- .../Classes/OpenAPIs/CodableHelper.swift | 2 +- .../Classes/OpenAPIs/Configuration.swift | 6 +- .../Classes/OpenAPIs/Extensions.swift | 20 +- .../Classes/OpenAPIs/JSONDataEncoding.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 8 +- .../Classes/OpenAPIs/Models.swift | 7 +- .../Models/AdditionalPropertiesClass.swift | 12 +- .../Classes/OpenAPIs/Models/Animal.swift | 6 +- .../Classes/OpenAPIs/Models/AnimalFarm.swift | 1 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 4 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 6 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 6 +- .../OpenAPIs/Models/Capitalization.swift | 6 +- .../Classes/OpenAPIs/Models/Cat.swift | 6 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/Category.swift | 6 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 2 +- .../Classes/OpenAPIs/Models/Client.swift | 4 +- .../Classes/OpenAPIs/Models/Dog.swift | 6 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 6 +- .../Classes/OpenAPIs/Models/EnumClass.swift | 1 + .../Classes/OpenAPIs/Models/EnumTest.swift | 6 +- .../Classes/OpenAPIs/Models/File.swift | 2 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 4 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 4 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 4 +- .../Classes/OpenAPIs/Models/List.swift | 6 +- .../Classes/OpenAPIs/Models/MapTest.swift | 14 +- ...opertiesAndAdditionalPropertiesClass.swift | 8 +- .../OpenAPIs/Models/Model200Response.swift | 4 +- .../Classes/OpenAPIs/Models/Name.swift | 4 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/Order.swift | 6 +- .../OpenAPIs/Models/OuterComposite.swift | 6 +- .../Classes/OpenAPIs/Models/OuterEnum.swift | 1 + .../Classes/OpenAPIs/Models/Pet.swift | 6 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 4 +- .../Classes/OpenAPIs/Models/Return.swift | 4 +- .../OpenAPIs/Models/SpecialModelName.swift | 6 +- .../OpenAPIs/Models/StringBooleanMap.swift | 8 +- .../Classes/OpenAPIs/Models/Tag.swift | 6 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 6 +- .../OpenAPIs/Models/TypeHolderExample.swift | 6 +- .../Classes/OpenAPIs/Models/User.swift | 6 +- .../OpenAPIs/URLSessionImplementations.swift | 168 +++--- .../swift5/promisekitLibrary/Package.swift | 8 +- .../Classes/OpenAPIs/APIHelper.swift | 17 +- .../Classes/OpenAPIs/APIs.swift | 14 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 + .../Classes/OpenAPIs/APIs/FakeAPI.swift | 44 +- .../APIs/FakeClassnameTags123API.swift | 2 + .../Classes/OpenAPIs/APIs/PetAPI.swift | 38 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 22 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 24 +- .../Classes/OpenAPIs/CodableHelper.swift | 2 +- .../Classes/OpenAPIs/Configuration.swift | 6 +- .../Classes/OpenAPIs/Extensions.swift | 20 +- .../Classes/OpenAPIs/JSONDataEncoding.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 8 +- .../Classes/OpenAPIs/Models.swift | 7 +- .../Models/AdditionalPropertiesClass.swift | 12 +- .../Classes/OpenAPIs/Models/Animal.swift | 4 +- .../Classes/OpenAPIs/Models/AnimalFarm.swift | 1 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 4 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 6 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 6 +- .../OpenAPIs/Models/Capitalization.swift | 6 +- .../Classes/OpenAPIs/Models/Cat.swift | 4 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/Category.swift | 4 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 3 +- .../Classes/OpenAPIs/Models/Client.swift | 4 +- .../Classes/OpenAPIs/Models/Dog.swift | 4 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 6 +- .../Classes/OpenAPIs/Models/EnumClass.swift | 1 + .../Classes/OpenAPIs/Models/EnumTest.swift | 6 +- .../Classes/OpenAPIs/Models/File.swift | 3 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 4 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 4 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 4 +- .../Classes/OpenAPIs/Models/List.swift | 6 +- .../Classes/OpenAPIs/Models/MapTest.swift | 14 +- ...opertiesAndAdditionalPropertiesClass.swift | 8 +- .../OpenAPIs/Models/Model200Response.swift | 5 +- .../Classes/OpenAPIs/Models/Name.swift | 5 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/Order.swift | 4 +- .../OpenAPIs/Models/OuterComposite.swift | 6 +- .../Classes/OpenAPIs/Models/OuterEnum.swift | 1 + .../Classes/OpenAPIs/Models/Pet.swift | 4 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 4 +- .../Classes/OpenAPIs/Models/Return.swift | 5 +- .../OpenAPIs/Models/SpecialModelName.swift | 6 +- .../OpenAPIs/Models/StringBooleanMap.swift | 8 +- .../Classes/OpenAPIs/Models/Tag.swift | 4 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 6 +- .../OpenAPIs/Models/TypeHolderExample.swift | 6 +- .../Classes/OpenAPIs/Models/User.swift | 4 +- .../OpenAPIs/URLSessionImplementations.swift | 168 +++--- .../swift5/readonlyProperties/Package.swift | 4 +- .../Classes/OpenAPIs/APIHelper.swift | 17 +- .../Classes/OpenAPIs/APIs.swift | 14 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 4 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 56 +- .../APIs/FakeClassnameTags123API.swift | 4 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 48 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 26 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 36 +- .../Classes/OpenAPIs/CodableHelper.swift | 2 +- .../Classes/OpenAPIs/Configuration.swift | 6 +- .../Classes/OpenAPIs/Extensions.swift | 20 +- .../Classes/OpenAPIs/JSONDataEncoding.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 8 +- .../Classes/OpenAPIs/Models.swift | 7 +- .../Models/AdditionalPropertiesClass.swift | 12 +- .../Classes/OpenAPIs/Models/Animal.swift | 4 +- .../Classes/OpenAPIs/Models/AnimalFarm.swift | 1 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 4 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 6 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 6 +- .../OpenAPIs/Models/Capitalization.swift | 6 +- .../Classes/OpenAPIs/Models/Cat.swift | 4 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/Category.swift | 4 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 3 +- .../Classes/OpenAPIs/Models/Client.swift | 4 +- .../Classes/OpenAPIs/Models/Dog.swift | 4 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 6 +- .../Classes/OpenAPIs/Models/EnumClass.swift | 1 + .../Classes/OpenAPIs/Models/EnumTest.swift | 6 +- .../Classes/OpenAPIs/Models/File.swift | 3 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 4 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 4 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 4 +- .../Classes/OpenAPIs/Models/List.swift | 6 +- .../Classes/OpenAPIs/Models/MapTest.swift | 14 +- ...opertiesAndAdditionalPropertiesClass.swift | 8 +- .../OpenAPIs/Models/Model200Response.swift | 5 +- .../Classes/OpenAPIs/Models/Name.swift | 5 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/Order.swift | 4 +- .../OpenAPIs/Models/OuterComposite.swift | 6 +- .../Classes/OpenAPIs/Models/OuterEnum.swift | 1 + .../Classes/OpenAPIs/Models/Pet.swift | 4 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 4 +- .../Classes/OpenAPIs/Models/Return.swift | 5 +- .../OpenAPIs/Models/SpecialModelName.swift | 6 +- .../OpenAPIs/Models/StringBooleanMap.swift | 8 +- .../Classes/OpenAPIs/Models/Tag.swift | 4 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 6 +- .../OpenAPIs/Models/TypeHolderExample.swift | 6 +- .../Classes/OpenAPIs/Models/User.swift | 4 +- .../OpenAPIs/URLSessionImplementations.swift | 168 +++--- .../swift5/resultLibrary/Package.swift | 4 +- .../Classes/OpenAPIs/APIHelper.swift | 17 +- .../Classes/OpenAPIs/APIs.swift | 14 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 + .../Classes/OpenAPIs/APIs/FakeAPI.swift | 34 +- .../APIs/FakeClassnameTags123API.swift | 2 + .../Classes/OpenAPIs/APIs/PetAPI.swift | 30 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 20 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 20 +- .../Classes/OpenAPIs/CodableHelper.swift | 2 +- .../Classes/OpenAPIs/Configuration.swift | 6 +- .../Classes/OpenAPIs/Extensions.swift | 20 +- .../Classes/OpenAPIs/JSONDataEncoding.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 8 +- .../Classes/OpenAPIs/Models.swift | 7 +- .../Models/AdditionalPropertiesClass.swift | 12 +- .../Classes/OpenAPIs/Models/Animal.swift | 4 +- .../Classes/OpenAPIs/Models/AnimalFarm.swift | 1 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 4 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 6 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 6 +- .../OpenAPIs/Models/Capitalization.swift | 6 +- .../Classes/OpenAPIs/Models/Cat.swift | 4 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/Category.swift | 4 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 3 +- .../Classes/OpenAPIs/Models/Client.swift | 4 +- .../Classes/OpenAPIs/Models/Dog.swift | 4 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 6 +- .../Classes/OpenAPIs/Models/EnumClass.swift | 1 + .../Classes/OpenAPIs/Models/EnumTest.swift | 6 +- .../Classes/OpenAPIs/Models/File.swift | 3 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 4 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 4 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 4 +- .../Classes/OpenAPIs/Models/List.swift | 6 +- .../Classes/OpenAPIs/Models/MapTest.swift | 14 +- ...opertiesAndAdditionalPropertiesClass.swift | 8 +- .../OpenAPIs/Models/Model200Response.swift | 5 +- .../Classes/OpenAPIs/Models/Name.swift | 5 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/Order.swift | 4 +- .../OpenAPIs/Models/OuterComposite.swift | 6 +- .../Classes/OpenAPIs/Models/OuterEnum.swift | 1 + .../Classes/OpenAPIs/Models/Pet.swift | 4 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 4 +- .../Classes/OpenAPIs/Models/Return.swift | 5 +- .../OpenAPIs/Models/SpecialModelName.swift | 6 +- .../OpenAPIs/Models/StringBooleanMap.swift | 8 +- .../Classes/OpenAPIs/Models/Tag.swift | 4 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 6 +- .../OpenAPIs/Models/TypeHolderExample.swift | 6 +- .../Classes/OpenAPIs/Models/User.swift | 4 +- .../OpenAPIs/URLSessionImplementations.swift | 168 +++--- .../swift5/rxswiftLibrary/Package.swift | 6 +- .../Classes/OpenAPIs/APIHelper.swift | 17 +- .../Classes/OpenAPIs/APIs.swift | 14 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 2 + .../Classes/OpenAPIs/APIs/FakeAPI.swift | 34 +- .../APIs/FakeClassnameTags123API.swift | 2 + .../Classes/OpenAPIs/APIs/PetAPI.swift | 30 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 20 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 20 +- .../Classes/OpenAPIs/CodableHelper.swift | 2 +- .../Classes/OpenAPIs/Configuration.swift | 6 +- .../Classes/OpenAPIs/Extensions.swift | 20 +- .../Classes/OpenAPIs/JSONDataEncoding.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 8 +- .../Classes/OpenAPIs/Models.swift | 7 +- .../Models/AdditionalPropertiesClass.swift | 12 +- .../Classes/OpenAPIs/Models/Animal.swift | 4 +- .../Classes/OpenAPIs/Models/AnimalFarm.swift | 1 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 4 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 6 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 6 +- .../OpenAPIs/Models/Capitalization.swift | 6 +- .../Classes/OpenAPIs/Models/Cat.swift | 4 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/Category.swift | 4 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 3 +- .../Classes/OpenAPIs/Models/Client.swift | 4 +- .../Classes/OpenAPIs/Models/Dog.swift | 4 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 6 +- .../Classes/OpenAPIs/Models/EnumClass.swift | 1 + .../Classes/OpenAPIs/Models/EnumTest.swift | 6 +- .../Classes/OpenAPIs/Models/File.swift | 3 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 4 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 4 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 4 +- .../Classes/OpenAPIs/Models/List.swift | 6 +- .../Classes/OpenAPIs/Models/MapTest.swift | 14 +- ...opertiesAndAdditionalPropertiesClass.swift | 8 +- .../OpenAPIs/Models/Model200Response.swift | 5 +- .../Classes/OpenAPIs/Models/Name.swift | 5 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/Order.swift | 4 +- .../OpenAPIs/Models/OuterComposite.swift | 6 +- .../Classes/OpenAPIs/Models/OuterEnum.swift | 1 + .../Classes/OpenAPIs/Models/Pet.swift | 4 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 4 +- .../Classes/OpenAPIs/Models/Return.swift | 5 +- .../OpenAPIs/Models/SpecialModelName.swift | 6 +- .../OpenAPIs/Models/StringBooleanMap.swift | 8 +- .../Classes/OpenAPIs/Models/Tag.swift | 4 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 6 +- .../OpenAPIs/Models/TypeHolderExample.swift | 6 +- .../Classes/OpenAPIs/Models/User.swift | 4 +- .../OpenAPIs/URLSessionImplementations.swift | 168 +++--- .../swift5/urlsessionLibrary/Package.swift | 4 +- .../Classes/OpenAPIs/APIHelper.swift | 17 +- .../Classes/OpenAPIs/APIs.swift | 14 +- .../OpenAPIs/APIs/AnotherFakeAPI.swift | 4 +- .../Classes/OpenAPIs/APIs/FakeAPI.swift | 56 +- .../APIs/FakeClassnameTags123API.swift | 4 +- .../Classes/OpenAPIs/APIs/PetAPI.swift | 48 +- .../Classes/OpenAPIs/APIs/StoreAPI.swift | 26 +- .../Classes/OpenAPIs/APIs/UserAPI.swift | 36 +- .../Classes/OpenAPIs/CodableHelper.swift | 2 +- .../Classes/OpenAPIs/Configuration.swift | 6 +- .../Classes/OpenAPIs/Extensions.swift | 20 +- .../Classes/OpenAPIs/JSONDataEncoding.swift | 2 +- .../Classes/OpenAPIs/JSONEncodingHelper.swift | 8 +- .../Classes/OpenAPIs/Models.swift | 7 +- .../Models/AdditionalPropertiesClass.swift | 12 +- .../Classes/OpenAPIs/Models/Animal.swift | 4 +- .../Classes/OpenAPIs/Models/AnimalFarm.swift | 1 + .../Classes/OpenAPIs/Models/ApiResponse.swift | 4 +- .../Models/ArrayOfArrayOfNumberOnly.swift | 6 +- .../OpenAPIs/Models/ArrayOfNumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/ArrayTest.swift | 6 +- .../OpenAPIs/Models/Capitalization.swift | 6 +- .../Classes/OpenAPIs/Models/Cat.swift | 4 +- .../Classes/OpenAPIs/Models/CatAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/Category.swift | 4 +- .../Classes/OpenAPIs/Models/ClassModel.swift | 3 +- .../Classes/OpenAPIs/Models/Client.swift | 4 +- .../Classes/OpenAPIs/Models/Dog.swift | 4 +- .../Classes/OpenAPIs/Models/DogAllOf.swift | 4 +- .../Classes/OpenAPIs/Models/EnumArrays.swift | 6 +- .../Classes/OpenAPIs/Models/EnumClass.swift | 1 + .../Classes/OpenAPIs/Models/EnumTest.swift | 6 +- .../Classes/OpenAPIs/Models/File.swift | 3 +- .../OpenAPIs/Models/FileSchemaTestClass.swift | 4 +- .../Classes/OpenAPIs/Models/FormatTest.swift | 4 +- .../OpenAPIs/Models/HasOnlyReadOnly.swift | 4 +- .../Classes/OpenAPIs/Models/List.swift | 6 +- .../Classes/OpenAPIs/Models/MapTest.swift | 14 +- ...opertiesAndAdditionalPropertiesClass.swift | 8 +- .../OpenAPIs/Models/Model200Response.swift | 5 +- .../Classes/OpenAPIs/Models/Name.swift | 5 +- .../Classes/OpenAPIs/Models/NumberOnly.swift | 6 +- .../Classes/OpenAPIs/Models/Order.swift | 4 +- .../OpenAPIs/Models/OuterComposite.swift | 6 +- .../Classes/OpenAPIs/Models/OuterEnum.swift | 1 + .../Classes/OpenAPIs/Models/Pet.swift | 4 +- .../OpenAPIs/Models/ReadOnlyFirst.swift | 4 +- .../Classes/OpenAPIs/Models/Return.swift | 5 +- .../OpenAPIs/Models/SpecialModelName.swift | 6 +- .../OpenAPIs/Models/StringBooleanMap.swift | 8 +- .../Classes/OpenAPIs/Models/Tag.swift | 4 +- .../OpenAPIs/Models/TypeHolderDefault.swift | 6 +- .../OpenAPIs/Models/TypeHolderExample.swift | 6 +- .../Classes/OpenAPIs/Models/User.swift | 4 +- .../OpenAPIs/URLSessionImplementations.swift | 168 +++--- .../builds/with-npm/README.md | 20 +- .../builds/with-npm/package.json | 4 +- .../builds/default/.openapi-generator-ignore | 22 +- .../es6-target/.openapi-generator-ignore | 22 +- .../.openapi-generator-ignore | 22 +- .../.openapi-generator-ignore | 22 +- .../.openapi-generator-ignore | 22 +- .../tests/default/.openapi-generator-ignore | 3 + .../go-petstore/.openapi-generator/FILES | 1 - .../go/go-petstore/.openapi-generator/FILES | 1 - .../jersey2-java8/.openapi-generator-ignore | 25 +- .../jersey2-java8/.openapi-generator/FILES | 1 - .../java/jersey2-java8/docs/FakeApi.md | 2 +- .../org/openapitools/client/api/FakeApi.java | 6 +- .../openapitools/client/model/FormatTest.java | 2 +- .../client/model/InlineObject3.java | 2 +- .../.openapi-generator/FILES | 56 -- .../.openapi-generator-ignore | 22 +- .../.openapi-generator-ignore | 23 +- .../.openapi-generator-ignore | 22 +- .../.openapi-generator-ignore | 22 +- .../.openapi-generator-ignore | 22 +- .../.openapi-generator-ignore | 22 +- .../.openapi-generator-ignore | 22 +- .../.openapi-generator-ignore | 22 +- .../.openapi-generator-ignore | 22 +- .../.openapi-generator/FILES | 68 +++ .../.openapi-generator/VERSION | 2 +- .../petstore/jaxrs-cxf-test-data/pom.xml | 8 +- .../petstore/jaxrs-cxf-test-data/readme.md | 19 +- .../java/org/openapitools/api/FakeApi.java | 17 +- .../gen/java/org/openapitools/api/PetApi.java | 5 +- .../model/AdditionalPropertiesAnyType.java | 1 + .../model/AdditionalPropertiesArray.java | 1 + .../model/AdditionalPropertiesBoolean.java | 1 + .../model/AdditionalPropertiesClass.java | 10 +- .../model/AdditionalPropertiesInteger.java | 1 + .../model/AdditionalPropertiesNumber.java | 1 + .../model/AdditionalPropertiesObject.java | 1 + .../model/AdditionalPropertiesString.java | 1 + .../java/org/openapitools/model/Animal.java | 2 + .../model/ArrayOfArrayOfNumberOnly.java | 1 + .../openapitools/model/ArrayOfNumberOnly.java | 1 + .../org/openapitools/model/ArrayTest.java | 1 + .../java/org/openapitools/model/BigCat.java | 104 ++++ .../org/openapitools/model/BigCatAllOf.java | 102 ++++ .../openapitools/model/Capitalization.java | 1 + .../gen/java/org/openapitools/model/Cat.java | 2 + .../java/org/openapitools/model/CatAllOf.java | 68 +++ .../java/org/openapitools/model/Category.java | 1 + .../org/openapitools/model/ClassModel.java | 1 + .../java/org/openapitools/model/Client.java | 1 + .../gen/java/org/openapitools/model/Dog.java | 2 + .../java/org/openapitools/model/DogAllOf.java | 68 +++ .../org/openapitools/model/EnumArrays.java | 1 + .../java/org/openapitools/model/EnumTest.java | 1 + .../model/FileSchemaTestClass.java | 3 +- .../org/openapitools/model/FormatTest.java | 29 + .../openapitools/model/HasOnlyReadOnly.java | 1 + .../java/org/openapitools/model/MapTest.java | 19 +- ...ropertiesAndAdditionalPropertiesClass.java | 1 + .../openapitools/model/Model200Response.java | 1 + .../openapitools/model/ModelApiResponse.java | 1 + .../org/openapitools/model/ModelReturn.java | 1 + .../gen/java/org/openapitools/model/Name.java | 1 + .../org/openapitools/model/NumberOnly.java | 1 + .../java/org/openapitools/model/Order.java | 1 + .../openapitools/model/OuterComposite.java | 1 + .../gen/java/org/openapitools/model/Pet.java | 13 +- .../org/openapitools/model/ReadOnlyFirst.java | 1 + .../openapitools/model/SpecialModelName.java | 1 + .../gen/java/org/openapitools/model/Tag.java | 1 + .../openapitools/model/TypeHolderDefault.java | 1 + .../openapitools/model/TypeHolderExample.java | 30 + .../gen/java/org/openapitools/model/User.java | 1 + .../java/org/openapitools/model/XmlItem.java | 1 + .../api/impl/AnotherFakeApiServiceImpl.java | 2 +- .../api/impl/FakeApiServiceImpl.java | 11 +- .../FakeClassnameTags123ApiServiceImpl.java | 2 +- .../api/impl/PetApiServiceImpl.java | 7 +- .../api/impl/StoreApiServiceImpl.java | 2 +- .../api/impl/UserApiServiceImpl.java | 2 +- .../src/main/resources/test-data.json | 9 +- .../test-data-control.json | 17 + .../jaxrs-cxf/.openapi-generator/FILES | 12 - .../eap-java8/.openapi-generator/FILES | 1 - .../eap-joda/.openapi-generator/FILES | 1 - .../eap/.openapi-generator/FILES | 1 - .../jersey1-useTags/.openapi-generator/FILES | 1 - .../jaxrs/jersey1/.openapi-generator/FILES | 1 - .../jersey2-useTags/.openapi-generator/FILES | 1 - .../jaxrs/jersey2/.openapi-generator/FILES | 1 - .../ktor/.openapi-generator-ignore | 22 +- .../.openapi-generator/FILES | 4 - .../.openapi-generator/FILES | 4 - .../.openapi-generator/FILES | 10 - .../.openapi-generator/FILES | 4 - .../python-aiohttp/.openapi-generator/FILES | 4 - .../.openapi-generator/FILES | 1 - .../.openapi-generator/FILES | 4 - .../python-flask/.openapi-generator/FILES | 4 - .../.openapi-generator/FILES | 1 - .../.openapi-generator/FILES | 1 - .../.openapi-generator/FILES | 1 - .../.openapi-generator/FILES | 1 - .../.openapi-generator/FILES | 1 - .../.openapi-generator/FILES | 1 - .../.openapi-generator/FILES | 1 - .../springboot/.openapi-generator/FILES | 1 - shippable.yml | 9 - 2008 files changed, 11510 insertions(+), 24181 deletions(-) delete mode 100644 CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj delete mode 100644 CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfo.cs delete mode 100644 CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfoInputs.cache delete mode 100644 CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj delete mode 100644 CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfo.cs delete mode 100644 CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfoInputs.cache delete mode 100644 CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj delete mode 100644 CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/obj/Debug/Org.OpenAPITools.Test.csprojAssemblyReference.cache delete mode 100644 CI/samples.ci/client/petstore/java/jersey2-java6/build.gradle delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/common/ConfigurationTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/common/StringUtilTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/jersey1/ApiClientTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/jersey1/auth/ApiKeyAuthTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/jersey1/auth/HttpBasicAuthTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/jersey1/model/EnumValueTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/jersey2-java8/JSONComposedSchemaTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/jersey2-java8/JSONTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/jersey2/ApiClientTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/jersey2/JSONTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/jersey2/auth/ApiKeyAuthTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/jersey2/auth/HttpBasicAuthTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/jersey2/model/EnumValueTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/ApiClientTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/JSONTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/api/PetApiTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/auth/ApiKeyAuthTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/auth/HttpBasicAuthTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/model/ArrayOfArrayOfNumberOnlyTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/model/EnumValueTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/model/PetTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/resttemplate/ApiClientTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/resttemplate/auth/ApiKeyAuthTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/resttemplate/auth/HttpBasicAuthTest.java delete mode 100644 CI/samples.ci/client/petstore/java/test-manual/resttemplate/model/EnumValueTest.java delete mode 100644 CI/samples.ci/client/petstore/kotlin-string/pom.xml delete mode 100644 CI/samples.ci/client/petstore/kotlin-threetenbp/pom.xml delete mode 100644 CI/samples.ci/client/petstore/typescript-fetch/builds/default/pom.xml delete mode 100644 CI/samples.ci/client/petstore/typescript-fetch/builds/es6-target/pom.xml delete mode 100644 CI/samples.ci/client/petstore/typescript-fetch/builds/multiple-parameters/pom.xml delete mode 100644 CI/samples.ci/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/pom.xml delete mode 100644 CI/samples.ci/client/petstore/typescript-fetch/builds/with-npm-version/pom.xml delete mode 100644 CI/samples.ci/client/petstore/typescript-fetch/tests/default/pom.xml delete mode 100644 CI/samples.ci/server/petstore/java-play-framework-api-package-override/pom.xml delete mode 100644 CI/samples.ci/server/petstore/java-play-framework-controller-only/pom.xml delete mode 100644 CI/samples.ci/server/petstore/java-play-framework-fake-endpoints/pom.xml delete mode 100644 CI/samples.ci/server/petstore/java-play-framework-no-bean-validation/pom.xml delete mode 100644 CI/samples.ci/server/petstore/java-play-framework-no-exception-handling/pom.xml delete mode 100644 CI/samples.ci/server/petstore/java-play-framework-no-interface/pom.xml delete mode 100644 CI/samples.ci/server/petstore/java-play-framework-no-swagger-ui/pom.xml delete mode 100644 CI/samples.ci/server/petstore/java-play-framework-no-wrap-calls/pom.xml delete mode 100644 CI/samples.ci/server/petstore/java-play-framework/pom.xml delete mode 100644 CI/samples.ci/server/petstore/kotlin-server/ktor/pom.xml delete mode 100644 CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/obj/Debug/Org.OpenAPITools.Test.csproj.CoreCompileInputs.cache delete mode 100644 CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/obj/Debug/Org.OpenAPITools.Test.csprojResolveAssemblyReference.cache delete mode 100755 bin/ada-petstore.sh delete mode 100755 bin/android-petstore-all.sh delete mode 100755 bin/android-petstore-httpclient.sh delete mode 100644 bin/android-petstore-volley.json delete mode 100755 bin/android-petstore-volley.sh delete mode 100755 bin/apache2-petstore-config.sh delete mode 100755 bin/apex-petstore.sh delete mode 100755 bin/asciidoc-documentation-petstore.sh delete mode 100755 bin/aspnetcore-petstore-server-3.0.sh delete mode 100755 bin/aspnetcore-petstore-server-3.1.sh delete mode 100755 bin/aspnetcore-petstore-server.sh delete mode 100644 bin/aspnetcore3-petstore-server.sh delete mode 100755 bin/avro-petstore.sh delete mode 100755 bin/bash-petstore.sh delete mode 100755 bin/c-petstore.sh delete mode 100644 bin/ci/apex-petstore.json delete mode 100644 bin/ci/csharp-netcore-petstore-1.json delete mode 100644 bin/ci/csharp-netcore-petstore.json delete mode 100644 bin/ci/csharp-petstore.json delete mode 100644 bin/ci/dart-flutter-petstore.json delete mode 100644 bin/ci/dart-jaguar-petstore-1.json delete mode 100644 bin/ci/dart-jaguar-petstore-2.json delete mode 100644 bin/ci/dart-jaguar-petstore-3.json delete mode 100644 bin/ci/dart-jaguar-petstore.json delete mode 100644 bin/ci/dart-petstore-flutter.json delete mode 100644 bin/ci/dart-petstore-openapi-browser-client.json delete mode 100644 bin/ci/dart-petstore.json delete mode 100644 bin/ci/dart2-petstore.json delete mode 100644 bin/ci/elixir-petstore.json delete mode 100644 bin/ci/go-gin-petstore-server.json delete mode 100644 bin/ci/go-petstore-withxml.json delete mode 100644 bin/ci/go-petstore.json delete mode 100644 bin/ci/groovy-petstore.json delete mode 100644 bin/ci/haskell-http-client-petstore.json delete mode 100644 bin/ci/java-feign.json delete mode 100644 bin/ci/java-feign10x.json delete mode 100644 bin/ci/java-google-api-client.json delete mode 100644 bin/ci/java-jaxrs-cxf-annotated-base-path.json delete mode 100644 bin/ci/java-jaxrs-cxf-cdi.json delete mode 100644 bin/ci/java-jaxrs-cxf-non-spring-app.json delete mode 100644 bin/ci/java-jaxrs-cxf.json delete mode 100644 bin/ci/java-jaxrs-datelib-j8.json delete mode 100644 bin/ci/java-jaxrs-jersey.json delete mode 100644 bin/ci/java-jaxrs-jersey1-useTags.json delete mode 100644 bin/ci/java-jaxrs-jersey1.json delete mode 100644 bin/ci/java-jaxrs-jersey2-useTags.json delete mode 100644 bin/ci/java-jaxrs-jersey2.json delete mode 100644 bin/ci/java-jaxrs-resteasy-eap-java8-server.json delete mode 100644 bin/ci/java-jaxrs-resteasy-eap-joda-server.json delete mode 100644 bin/ci/java-jaxrs-resteasy-eap.json delete mode 100644 bin/ci/java-jaxrs-resteasy-joda-server.json delete mode 100644 bin/ci/java-jaxrs-resteasy.json delete mode 100644 bin/ci/java-jaxrs-spec-interface.json delete mode 100644 bin/ci/java-jaxrs-spec.json delete mode 100644 bin/ci/java-jersey1.json delete mode 100644 bin/ci/java-jersey2-java6.json delete mode 100644 bin/ci/java-jersey2-java8.json delete mode 100644 bin/ci/java-jersey2.json delete mode 100644 bin/ci/java-msf4j-petstore-server.json delete mode 100644 bin/ci/java-native.json delete mode 100644 bin/ci/java-okhttp-gson-parcelableModel.json delete mode 100644 bin/ci/java-okhttp-gson.json delete mode 100644 bin/ci/java-petstore-feign-10x.json delete mode 100644 bin/ci/java-play-framework-api-package-override.json delete mode 100644 bin/ci/java-play-framework-async.json delete mode 100644 bin/ci/java-play-framework-controller-only.json delete mode 100644 bin/ci/java-play-framework-fake-endpoints.json delete mode 100644 bin/ci/java-play-framework-no-bean-validation.json delete mode 100644 bin/ci/java-play-framework-no-exception-handling.json delete mode 100644 bin/ci/java-play-framework-no-interface.json delete mode 100644 bin/ci/java-play-framework-no-swagger-ui.json delete mode 100644 bin/ci/java-play-framework-no-wrap-calls.json delete mode 100644 bin/ci/java-play-framework.json delete mode 100644 bin/ci/java-rest-assured-jackson.json delete mode 100644 bin/ci/java-rest-assured.json delete mode 100644 bin/ci/java-resteasy.json delete mode 100644 bin/ci/java-resttemplate-withXml.json delete mode 100644 bin/ci/java-resttemplate.json delete mode 100644 bin/ci/java-retrofit.json delete mode 100644 bin/ci/java-retrofit2-play24.json delete mode 100644 bin/ci/java-retrofit2-play25.json delete mode 100644 bin/ci/java-retrofit2-play26.json delete mode 100644 bin/ci/java-retrofit2.json delete mode 100644 bin/ci/java-retrofit2rx.json delete mode 100644 bin/ci/java-retrofit2rx2.json delete mode 100644 bin/ci/java-vertx.json delete mode 100644 bin/ci/java-webclient.json delete mode 100644 bin/ci/javascript-petstore-1.json delete mode 100644 bin/ci/javascript-petstore-2.json delete mode 100644 bin/ci/javascript-petstore-3.json delete mode 100644 bin/ci/javascript-petstore.json delete mode 100644 bin/ci/kotlin-client-petstore-multiplatform.json delete mode 100644 bin/ci/kotlin-client-petstore.json delete mode 100644 bin/ci/kotlin-client-string.json delete mode 100644 bin/ci/kotlin-client-threetenbp.json delete mode 100644 bin/ci/kotlin-server-petstore.json delete mode 100644 bin/ci/kotlin-springboot-petstore-server-reactive.json delete mode 100644 bin/ci/kotlin-springboot-petstore-server.json delete mode 100644 bin/ci/mysql-schema-petstore.json delete mode 100644 bin/ci/openapi3-jaxrs-jersey-petstore.json delete mode 100644 bin/ci/openapi3-php-petstore.json delete mode 100644 bin/ci/openapi3-python-petstore.json delete mode 100644 bin/ci/openapi3-ruby-client-faraday-petstore.json delete mode 100644 bin/ci/openapi3-ruby-client-petstore.json delete mode 100644 bin/ci/perl-petstore-1.json delete mode 100644 bin/ci/perl-petstore.json delete mode 100644 bin/ci/php-lumen-petstore-server.json delete mode 100644 bin/ci/php-petstore.json delete mode 100644 bin/ci/php-silex-petstore-server.json delete mode 100644 bin/ci/php-slim-server-petstore.json delete mode 100644 bin/ci/php-slim4-server-petstore.json delete mode 100644 bin/ci/php-symfony-petstore.json delete mode 100644 bin/ci/php-ze-ph-petstore-server.json delete mode 100644 bin/ci/python-experimental.json delete mode 100644 bin/ci/python-petstore-1.json delete mode 100644 bin/ci/python-petstore-2.json delete mode 100644 bin/ci/python-petstore.json delete mode 100644 bin/ci/r-petstore.json delete mode 100644 bin/ci/ruby-client-petstore-faraday.json delete mode 100644 bin/ci/ruby-client-petstore.json delete mode 100644 bin/ci/rust-server-petstore-1.json delete mode 100644 bin/ci/rust-server-petstore-2.json delete mode 100644 bin/ci/rust-server-petstore-3.json delete mode 100644 bin/ci/rust-server-petstore-4.json delete mode 100644 bin/ci/rust-server-petstore.json delete mode 100644 bin/ci/spring-cloud-async.json delete mode 100644 bin/ci/spring-cloud-feign-petstore.json delete mode 100644 bin/ci/spring-petstore-10.json delete mode 100644 bin/ci/spring-petstore-11.json delete mode 100644 bin/ci/spring-petstore-12.json delete mode 100644 bin/ci/spring-petstore-13.json delete mode 100644 bin/ci/spring-petstore-2.json delete mode 100644 bin/ci/spring-petstore-3.json delete mode 100644 bin/ci/spring-petstore-4.json delete mode 100644 bin/ci/spring-petstore-5.json delete mode 100644 bin/ci/spring-petstore-6.json delete mode 100644 bin/ci/spring-petstore-7.json delete mode 100644 bin/ci/spring-petstore-8.json delete mode 100644 bin/ci/spring-petstore-9.json delete mode 100644 bin/ci/spring-stubs.json delete mode 100644 bin/ci/typescript-angular-petstore-1.json delete mode 100644 bin/ci/typescript-angular-petstore-10.json delete mode 100644 bin/ci/typescript-angular-petstore-11.json delete mode 100644 bin/ci/typescript-angular-petstore-12.json delete mode 100644 bin/ci/typescript-angular-petstore-13.json delete mode 100644 bin/ci/typescript-angular-petstore-2.json delete mode 100644 bin/ci/typescript-angular-petstore-3.json delete mode 100644 bin/ci/typescript-angular-petstore-4.json delete mode 100644 bin/ci/typescript-angular-petstore-5.json delete mode 100644 bin/ci/typescript-angular-petstore-6.json delete mode 100644 bin/ci/typescript-angular-petstore-7.json delete mode 100644 bin/ci/typescript-angular-petstore-8.json delete mode 100644 bin/ci/typescript-angular-petstore-9.json delete mode 100644 bin/ci/typescript-angular-petstore.json delete mode 100644 bin/ci/typescript-angularjs-petstore.json delete mode 100644 bin/ci/typescript-aurelia-petstore.json delete mode 100644 bin/ci/typescript-axios-petstore-1.json delete mode 100644 bin/ci/typescript-axios-petstore-2.json delete mode 100644 bin/ci/typescript-axios-petstore-3.json delete mode 100644 bin/ci/typescript-axios-petstore-4.json delete mode 100644 bin/ci/typescript-axios-petstore-5.json delete mode 100644 bin/ci/typescript-axios-petstore.json delete mode 100644 bin/ci/typescript-fetch-petstore-1.json delete mode 100644 bin/ci/typescript-fetch-petstore-2.json delete mode 100644 bin/ci/typescript-fetch-petstore-3.json delete mode 100644 bin/ci/typescript-fetch-petstore-4.json delete mode 100644 bin/ci/typescript-fetch-petstore-5.json delete mode 100644 bin/ci/typescript-fetch-petstore.json delete mode 100644 bin/ci/typescript-inversify-petstore.json delete mode 100644 bin/ci/typescript-jquery-petstore-1.json delete mode 100644 bin/ci/typescript-jquery-petstore.json delete mode 100644 bin/ci/typescript-node-petstore-1.json delete mode 100644 bin/ci/typescript-node-petstore.json delete mode 100644 bin/ci/typescript-rxjs-petstore-1.json delete mode 100644 bin/ci/typescript-rxjs-petstore-2.json delete mode 100644 bin/ci/typescript-rxjs-petstore-3.json delete mode 100644 bin/ci/typescript-rxjs-petstore.json delete mode 100755 bin/clojure-petstore.sh create mode 100644 bin/configs/apex.yaml create mode 100644 bin/configs/cpp-qt5-qhttpengine-server.yaml create mode 100644 bin/configs/cpp-restsdk-client.yaml create mode 100644 bin/configs/csharp-OpenAPIClient.yaml create mode 100644 bin/configs/csharp-netcore-OpenAPIClient.yaml create mode 100644 bin/configs/csharp-netcore-OpenAPIClientCore.yaml create mode 100644 bin/configs/dart-jaguar-openapi-flutter.yaml create mode 100644 bin/configs/dart-jaguar-openapi-flutter_proto.yaml create mode 100644 bin/configs/dart-jaguar-openapi.yaml create mode 100644 bin/configs/dart-jaguar-openapi_proto.yaml create mode 100644 bin/configs/dart-openapi-browser-client.yaml create mode 100644 bin/configs/dart-openapi-flutter.yaml create mode 100644 bin/configs/dart-openapi.yaml create mode 100644 bin/configs/dart-petstore_client_lib.yaml create mode 100644 bin/configs/elixir.yaml create mode 100644 bin/configs/elm.yaml create mode 100644 bin/configs/go-experimental-go-petstore-oas2.yaml create mode 100644 bin/configs/go-experimental-go-petstore.yaml create mode 100644 bin/configs/go-gin-server-go-gin-api-server.yaml create mode 100644 bin/configs/go-petstore-oas2.yaml create mode 100644 bin/configs/go-petstore-withXml.yaml create mode 100644 bin/configs/go-petstore.yaml create mode 100644 bin/configs/go-server-go-api-server.yaml create mode 100644 bin/configs/groovy.yaml create mode 100644 bin/configs/haskell-http-client.yaml create mode 100644 bin/configs/java-feign10x.yaml create mode 100644 bin/configs/java-google-api-client.yaml create mode 100644 bin/configs/java-jersey1.yaml create mode 100644 bin/configs/java-jersey2-8-oas2.yaml create mode 100644 bin/configs/java-jersey2-8.yaml create mode 100644 bin/configs/java-microprofile-rest-client.yaml create mode 100644 bin/configs/java-msf4j.yaml create mode 100644 bin/configs/java-native.yaml create mode 100644 bin/configs/java-okhttp-gson-parcelableModel.yaml create mode 100644 bin/configs/java-okhttp-gson.yaml create mode 100644 bin/configs/java-play-framework-api-package-override.yaml create mode 100644 bin/configs/java-play-framework-async.yaml create mode 100644 bin/configs/java-play-framework-controller-only.yaml create mode 100644 bin/configs/java-play-framework-fake-endpoints.yaml create mode 100644 bin/configs/java-play-framework-no-bean-validation.yaml create mode 100644 bin/configs/java-play-framework-no-exception-handling.yaml create mode 100644 bin/configs/java-play-framework-no-interface.yaml create mode 100644 bin/configs/java-play-framework-no-swagger-ui.yaml create mode 100644 bin/configs/java-play-framework-no-wrap-calls.yaml create mode 100644 bin/configs/java-play-framework.yaml create mode 100644 bin/configs/java-rest-assured-jackson.yaml create mode 100644 bin/configs/java-rest-assured.yaml create mode 100644 bin/configs/java-resteasy.yaml create mode 100644 bin/configs/java-resttemplate-withXml.yaml create mode 100644 bin/configs/java-resttemplate.yaml create mode 100644 bin/configs/java-retrofit2-play24.yaml create mode 100644 bin/configs/java-retrofit2-play25.yaml create mode 100644 bin/configs/java-retrofit2-play26.yaml create mode 100644 bin/configs/java-retrofit2.yaml create mode 100644 bin/configs/java-retrofit2rx.yaml create mode 100644 bin/configs/java-retrofit2rx2.yaml create mode 100644 bin/configs/java-vertx.yaml create mode 100644 bin/configs/java-webclient.yaml create mode 100644 bin/configs/javascript-es6.yaml create mode 100644 bin/configs/javascript-promise-es6.yaml create mode 100644 bin/configs/jaxrs-cxf-annotated-base-path.yaml create mode 100644 bin/configs/jaxrs-cxf-cdi.yaml create mode 100644 bin/configs/jaxrs-cxf-non-spring-app.yaml create mode 100644 bin/configs/jaxrs-cxf.yaml create mode 100644 bin/configs/jaxrs-jersey-jaxrs-datelib-j8.yaml create mode 100644 bin/configs/jaxrs-jersey-jersey1-useTags.yaml create mode 100644 bin/configs/jaxrs-jersey-jersey1.yaml create mode 100644 bin/configs/jaxrs-jersey-jersey2-useTags.yaml create mode 100644 bin/configs/jaxrs-jersey-jersey2.yaml create mode 100644 bin/configs/jaxrs-jersey.yaml create mode 100644 bin/configs/jaxrs-resteasy-default.yaml create mode 100644 bin/configs/jaxrs-resteasy-eap-eap-java8.yaml create mode 100644 bin/configs/jaxrs-resteasy-eap-eap-joda.yaml create mode 100644 bin/configs/jaxrs-resteasy-eap-eap.yaml create mode 100644 bin/configs/jaxrs-resteasy-joda.yaml create mode 100644 bin/configs/jaxrs-spec-interface.yaml create mode 100644 bin/configs/jaxrs-spec.yaml create mode 100644 bin/configs/kotlin-gson.yaml create mode 100644 bin/configs/kotlin-jackson.yaml create mode 100644 bin/configs/kotlin-json-request-string.yaml create mode 100644 bin/configs/kotlin-jvm-okhttp3-okhttp3.yaml create mode 100644 bin/configs/kotlin-jvm-okhttp4-coroutines.yaml create mode 100644 bin/configs/kotlin-jvm-retrofit2-retrofit2.yaml create mode 100644 bin/configs/kotlin-moshi-codegen.yaml create mode 100644 bin/configs/kotlin-multiplatform.yaml create mode 100644 bin/configs/kotlin-nonpublic.yaml create mode 100644 bin/configs/kotlin-nullable.yaml create mode 100644 bin/configs/kotlin-server-ktor.yaml create mode 100644 bin/configs/kotlin-spring-boot-reactive.yaml create mode 100644 bin/configs/kotlin-spring-boot.yaml create mode 100644 bin/configs/kotlin-string.yaml create mode 100644 bin/configs/kotlin-threetenbp.yaml create mode 100644 bin/configs/kotlin.yaml create mode 100644 bin/configs/lua.yaml create mode 100644 bin/configs/mysql-schema-mysql.yaml create mode 100644 bin/configs/nim.yaml create mode 100644 bin/configs/other/ada.yaml create mode 100644 bin/configs/other/android-httpclient.yaml create mode 100644 bin/configs/other/android-volley.yaml create mode 100644 bin/configs/other/apache2.yaml create mode 100644 bin/configs/other/asciidoc.yaml create mode 100644 bin/configs/other/aspnetcore-3.0.yaml create mode 100644 bin/configs/other/aspnetcore-3.1.yaml create mode 100644 bin/configs/other/aspnetcore.yaml create mode 100644 bin/configs/other/avro-schema.yaml create mode 100644 bin/configs/other/bash.yaml create mode 100644 bin/configs/other/c.yaml create mode 100644 bin/configs/other/clojure.yaml create mode 100644 bin/configs/other/cpp-pistache-server-cpp-pistache.yaml create mode 100644 bin/configs/other/cpp-qt5-client.yaml create mode 100644 bin/configs/other/cpp-restbed-server-cpp-restbed.yaml create mode 100644 bin/configs/other/cpp-tizen.yaml create mode 100644 bin/configs/other/cpp-ue4.yaml create mode 100644 bin/configs/other/csharp-OpenAPIClientNet35.yaml create mode 100644 bin/configs/other/csharp-OpenAPIClientNet40.yaml create mode 100644 bin/configs/other/csharp-OpenAPIClientNetCoreProject.yaml create mode 100644 bin/configs/other/csharp-OpenAPIClientNetStandard.yaml create mode 100644 bin/configs/other/csharp-OpenAPIClientWithPropertyChanged.yaml create mode 100644 bin/configs/other/csharp-dotnet2-OpenAPIClient.yaml create mode 100644 bin/configs/other/csharp-nancyfx-nancyfx-async.yaml create mode 100644 bin/configs/other/csharp-nancyfx-nancyfx.yaml create mode 100644 bin/configs/other/cwiki.yaml create mode 100644 bin/configs/other/dart-dio.yaml create mode 100644 bin/configs/other/dynamic-html.yaml create mode 100644 bin/configs/other/eiffel.yaml create mode 100644 bin/configs/other/erlang-client.yaml create mode 100644 bin/configs/other/erlang-proper.yaml create mode 100644 bin/configs/other/erlang-server.yaml create mode 100644 bin/configs/other/flash.yaml create mode 100644 bin/configs/other/fsharp-functions.yaml create mode 100644 bin/configs/other/fsharp-giraffe-server-fsharp-giraffe.yaml create mode 100644 bin/configs/other/graphql-nodejs-express-server.yaml create mode 100644 bin/configs/other/graphql-schema.yaml create mode 100644 bin/configs/other/haskell-servant.yaml create mode 100644 bin/configs/other/html.md.yaml create mode 100644 bin/configs/other/html.yaml create mode 100644 bin/configs/other/html2.yaml create mode 100644 bin/configs/other/java-inflector.yaml create mode 100644 bin/configs/other/java-native-async.yaml create mode 100644 bin/configs/other/java-pkmst.yaml create mode 100644 bin/configs/other/java-undertow-server-java-undertow.yaml create mode 100644 bin/configs/other/java-vertx-async.yaml create mode 100644 bin/configs/other/java-vertx-rx.yaml create mode 100644 bin/configs/other/java-vertx-web-rx.yaml create mode 100644 bin/configs/other/javascript-apollo.yaml create mode 100644 bin/configs/other/javascript-closure-angular.yaml create mode 100644 bin/configs/other/javascript-flowtyped.yaml create mode 100644 bin/configs/other/jaxrs-cxf-client.yaml create mode 100644 bin/configs/other/jaxrs-cxf-extended-jaxrs-cxf-test-data.yaml create mode 100644 bin/configs/other/jaxrs-spec-interface-response.yaml create mode 100644 bin/configs/other/jmeter.yaml create mode 100644 bin/configs/other/k6.yaml create mode 100644 bin/configs/other/kotlin-spring-boot-modelMutable.yaml create mode 100644 bin/configs/other/kotlin-uppercase-enum.yaml create mode 100644 bin/configs/other/kotlin-vertx-vertx.yaml create mode 100644 bin/configs/other/markdown.yaml create mode 100644 bin/configs/other/nodejs-express-server.yaml create mode 100644 bin/configs/other/objc-core-data.yaml create mode 100644 bin/configs/other/objc-default.yaml create mode 100644 bin/configs/other/ocaml.yaml create mode 100644 bin/configs/other/openapi3/android-httpclient.yaml create mode 100644 bin/configs/other/openapi3/android-volley.yaml create mode 100644 bin/configs/other/openapi3/avro-schema.yaml create mode 100644 bin/configs/other/openapi3/bash.yaml create mode 100644 bin/configs/other/openapi3/clojure.yaml create mode 100644 bin/configs/other/openapi3/cpp-pistache-server-cpp-pistache.yaml create mode 100644 bin/configs/other/openapi3/cpp-qt5-client-cpp-qt5.yaml create mode 100644 bin/configs/other/openapi3/cpp-qt5-qhttpengine-server.yaml create mode 100644 bin/configs/other/openapi3/cpp-restbed-server-cpp-restbed.yaml create mode 100644 bin/configs/other/openapi3/cpp-tizen.yaml create mode 100644 bin/configs/other/openapi3/csharp-OpenAPIClient.yaml create mode 100644 bin/configs/other/openapi3/csharp-OpenAPIClientNetStandard.yaml create mode 100644 bin/configs/other/openapi3/csharp-OpenAPIClientWithPropertyChanged.yaml create mode 100644 bin/configs/other/openapi3/csharp-dotnet2-OpenAPIClient.yaml create mode 100644 bin/configs/other/openapi3/elixir.yaml create mode 100644 bin/configs/other/openapi3/flash.yaml create mode 100644 bin/configs/other/openapi3/go-gin-server-go-gin-api-server.yaml create mode 100644 bin/configs/other/openapi3/go-petstore.yaml create mode 100644 bin/configs/other/openapi3/go-server-go-api-server.yaml create mode 100644 bin/configs/other/openapi3/graphql-nodejs-express-server.yaml create mode 100644 bin/configs/other/openapi3/haskell-http-client.yaml create mode 100644 bin/configs/other/openapi3/haskell-servant.yaml create mode 100644 bin/configs/other/openapi3/javascript-closure-angular.yaml create mode 100644 bin/configs/other/openapi3/jaxrs-cxf-client.yaml create mode 100644 bin/configs/other/openapi3/kotlin-jvm-retrofit2-coroutines.yaml create mode 100644 bin/configs/other/openapi3/kotlin-jvm-retrofit2-rx.yaml create mode 100644 bin/configs/other/openapi3/kotlin-jvm-retrofit2-rx2.yaml create mode 100644 bin/configs/other/openapi3/kotlin-multiplatform.yaml create mode 100644 bin/configs/other/openapi3/kotlin-spring-boot-reactive.yaml create mode 100644 bin/configs/other/openapi3/kotlin-spring-boot.yaml create mode 100644 bin/configs/other/openapi3/kotlin.yaml create mode 100644 bin/configs/other/openapi3/objc-core-data.yaml create mode 100644 bin/configs/other/openapi3/objc-default.yaml create mode 100644 bin/configs/other/openapi3/php-laravel.yaml create mode 100644 bin/configs/other/openapi3/php-slim-deprecated-php-slim.yaml create mode 100644 bin/configs/other/openapi3/php-slim4.yaml create mode 100644 bin/configs/other/openapi3/php-symfony-SymfonyBundle-php.yaml create mode 100644 bin/configs/other/openapi3/python-flask-python2.yaml create mode 100644 bin/configs/other/openapi3/python-flask.yaml create mode 100644 bin/configs/other/openapi3/r-R.yaml create mode 100644 bin/configs/other/openapi3/rust.yaml create mode 100644 bin/configs/other/openapi3/scala-finch.yaml create mode 100644 bin/configs/other/openapi3/typescript-angular-default.yaml create mode 100644 bin/configs/other/openapi3/typescript-angular-npm.yaml create mode 100644 bin/configs/other/openapi3/typescript-angular-with-interfaces.yaml create mode 100644 bin/configs/other/openapi3/typescript-angularjs.yaml create mode 100644 bin/configs/other/openapi3/typescript-aurelia-default.yaml create mode 100644 bin/configs/other/openapi3/typescript-fetch-default.yaml create mode 100644 bin/configs/other/openapi3/typescript-fetch-es6-target.yaml create mode 100644 bin/configs/other/openapi3/typescript-fetch-with-interfaces.yaml create mode 100644 bin/configs/other/openapi3/typescript-fetch-with-npm-version.yaml create mode 100644 bin/configs/other/openapi3/typescript-inversify.yaml create mode 100644 bin/configs/other/openapi3/typescript-jquery-default.yaml create mode 100644 bin/configs/other/openapi3/typescript-jquery-npm.yaml create mode 100644 bin/configs/other/openapi3/typescript-node-default.yaml create mode 100644 bin/configs/other/openapi3/typescript-node-npm.yaml create mode 100644 bin/configs/other/php-laravel.yaml create mode 100644 bin/configs/other/php-slim4.yaml create mode 100644 bin/configs/other/plantuml.yaml create mode 100644 bin/configs/other/powershell.yaml create mode 100644 bin/configs/other/protobuf-schema.yaml create mode 100644 bin/configs/other/ruby-on-rails.yaml create mode 100644 bin/configs/other/ruby-sinatra.yaml create mode 100644 bin/configs/other/rust-hyper-fileResponseTest.yaml create mode 100644 bin/configs/other/rust-hyper-petstore.yaml create mode 100644 bin/configs/other/rust-hyper-test.yaml create mode 100644 bin/configs/other/rust-reqwest-fileResponseTest.yaml create mode 100644 bin/configs/other/rust-reqwest-petstore-async.yaml create mode 100644 bin/configs/other/rust-reqwest-petstore.yaml create mode 100644 bin/configs/other/rust-reqwest-test.yaml create mode 100644 bin/configs/other/scala-akka-http-server.yaml create mode 100644 bin/configs/other/scala-finch.yaml create mode 100644 bin/configs/other/scala-gatling.yaml create mode 100644 bin/configs/other/scala-httpclient-deprecated-scala-httpclient.yaml create mode 100644 bin/configs/other/scala-lagom-server.yaml create mode 100644 bin/configs/other/scala-play-server.yaml create mode 100644 bin/configs/other/scalatra.yaml create mode 100644 bin/configs/other/scalaz.yaml create mode 100644 bin/configs/other/swift5-alamofireLibrary.yaml create mode 100644 bin/configs/other/swift5-combineLibrary.yaml create mode 100644 bin/configs/other/swift5-default.yaml create mode 100644 bin/configs/other/swift5-deprecated.yaml create mode 100644 bin/configs/other/swift5-nonPublicApi.yaml create mode 100644 bin/configs/other/swift5-objcCompatible.yaml create mode 100644 bin/configs/other/swift5-promisekitLibrary.yaml create mode 100644 bin/configs/other/swift5-readonlyProperties.yaml create mode 100644 bin/configs/other/swift5-resultLibrary.yaml create mode 100644 bin/configs/other/swift5-rxswiftLibrary.yaml create mode 100644 bin/configs/other/swift5-urlsessionLibrary.yaml create mode 100644 bin/configs/other/typescript-redux-query-default.yaml create mode 100644 bin/configs/perl-deep_module_test.yaml create mode 100644 bin/configs/perl.yaml create mode 100644 bin/configs/php-OpenAPIClient-oas2.yaml create mode 100644 bin/configs/php-OpenAPIClient.yaml create mode 100644 bin/configs/php-lumen.yaml create mode 100644 bin/configs/php-silex-deprecated-OpenAPIServer.yaml create mode 100644 bin/configs/php-slim-deprecated-php-slim.yaml create mode 100644 bin/configs/php-symfony-SymfonyBundle-php.yaml create mode 100644 bin/configs/php-ze-ph.yaml create mode 100644 bin/configs/python-aiohttp-srclayout.yaml create mode 100644 bin/configs/python-aiohttp.yaml create mode 100644 bin/configs/python-asyncio.yaml create mode 100644 bin/configs/python-blueplanet.yaml create mode 100644 bin/configs/python-experimental-oas2.yaml create mode 100644 bin/configs/python-experimental.yaml create mode 100644 bin/configs/python-flask-python2.yaml create mode 100644 bin/configs/python-flask.yaml create mode 100644 bin/configs/python-oas2.yaml create mode 100644 bin/configs/python-tornado.yaml create mode 100644 bin/configs/python.yaml create mode 100644 bin/configs/r-R.yaml create mode 100644 bin/configs/ruby-faraday.yaml create mode 100644 bin/configs/ruby.yaml create mode 100644 bin/configs/rust-server-multipart-v3.yaml create mode 100644 bin/configs/rust-server-no-example-v3.yaml create mode 100644 bin/configs/rust-server-openapi-v3.yaml create mode 100644 bin/configs/rust-server-ops-v3.yaml create mode 100644 bin/configs/rust-server-petstore-with-fake-endpoints-models-for-testing.yaml create mode 100644 bin/configs/rust-server-test.yaml create mode 100644 bin/configs/scala-akka.yaml create mode 100644 bin/configs/scala-sttp.yaml create mode 100644 bin/configs/spring-boot-beanvalidation.yaml create mode 100644 bin/configs/spring-boot-delegate-j8.yaml create mode 100644 bin/configs/spring-boot-delegate.yaml create mode 100644 bin/configs/spring-boot-implicitHeaders.yaml create mode 100644 bin/configs/spring-boot-reactive.yaml create mode 100644 bin/configs/spring-boot-useoptional.yaml create mode 100644 bin/configs/spring-boot-virtualan.yaml create mode 100644 bin/configs/spring-boot.yaml create mode 100644 bin/configs/spring-cloud-async.yaml create mode 100644 bin/configs/spring-cloud.yaml create mode 100644 bin/configs/spring-mvc-j8-async.yaml create mode 100644 bin/configs/spring-mvc-j8-localdatetime.yaml create mode 100644 bin/configs/spring-mvc.yaml create mode 100644 bin/configs/spring-stubs.yaml create mode 100644 bin/configs/typescript-angular-default-v6.yaml create mode 100644 bin/configs/typescript-angular-single-request-parameter-v8.yaml create mode 100644 bin/configs/typescript-angular-v6-provided-in-root-with-npm.yaml create mode 100644 bin/configs/typescript-angular-v6-provided-in-root.yaml create mode 100644 bin/configs/typescript-angular-v7-not-provided-in-root-with-npm.yaml create mode 100644 bin/configs/typescript-angular-v7-not-provided-in-root.yaml create mode 100644 bin/configs/typescript-angular-v7-provided-in-root-with-npm.yaml create mode 100644 bin/configs/typescript-angular-v7-provided-in-root.yaml create mode 100644 bin/configs/typescript-angular-with-npm-v6.yaml create mode 100644 bin/configs/typescript-angular-with-npm-v8.yaml create mode 100644 bin/configs/typescript-angular-with-prefixed-module-name-v8.yaml create mode 100644 bin/configs/typescript-angularjs.yaml create mode 100644 bin/configs/typescript-aurelia-default.yaml create mode 100644 bin/configs/typescript-axios-composed-schemas.yaml create mode 100644 bin/configs/typescript-axios-default.yaml create mode 100644 bin/configs/typescript-axios-es6-target.yaml create mode 100644 bin/configs/typescript-axios-with-complex-headers.yaml create mode 100644 bin/configs/typescript-axios-with-interfaces.yaml create mode 100644 bin/configs/typescript-axios-with-npm-version-and-separate-models-and-api.yaml create mode 100644 bin/configs/typescript-axios-with-npm-version.yaml create mode 100644 bin/configs/typescript-axios-with-single-request-parameters.yaml create mode 100644 bin/configs/typescript-fetch-default.yaml create mode 100644 bin/configs/typescript-fetch-es6-target.yaml create mode 100644 bin/configs/typescript-fetch-multiple-parameters.yaml create mode 100644 bin/configs/typescript-fetch-prefix-parameter-interfaces.yaml create mode 100644 bin/configs/typescript-fetch-typescript-three-plus.yaml create mode 100644 bin/configs/typescript-fetch-with-interfaces.yaml create mode 100644 bin/configs/typescript-fetch-with-npm-version.yaml create mode 100644 bin/configs/typescript-inversify.yaml create mode 100644 bin/configs/typescript-jquery-default.yaml create mode 100644 bin/configs/typescript-jquery-npm.yaml create mode 100644 bin/configs/typescript-node-default.yaml create mode 100644 bin/configs/typescript-node-npm.yaml create mode 100644 bin/configs/typescript-redux-query-with-npm-version.yaml create mode 100644 bin/configs/typescript-rxjs-default.yaml create mode 100644 bin/configs/typescript-rxjs-es6-target.yaml create mode 100644 bin/configs/typescript-rxjs-with-interfaces.yaml create mode 100644 bin/configs/typescript-rxjs-with-npm-version.yaml delete mode 100755 bin/cpp-pistache-server-petstore.sh delete mode 100644 bin/cpp-qt5-petstore.json delete mode 100755 bin/cpp-qt5-petstore.sh delete mode 100755 bin/cpp-qt5-qhttpengine-server-petstore.sh delete mode 100755 bin/cpp-restbed-petstore-server.sh delete mode 100755 bin/cpp-restsdk-petstore.sh delete mode 100755 bin/cpp-tizen-petstore.sh delete mode 100755 bin/cpp-ue4-petstore.sh delete mode 100755 bin/csharp-dotnet2-petstore.sh delete mode 100755 bin/csharp-netcore-petstore-all.sh delete mode 100755 bin/csharp-netcore-petstore-netcore.sh delete mode 100755 bin/csharp-netcore-petstore.sh delete mode 100755 bin/csharp-petstore-all.sh delete mode 100644 bin/csharp-petstore-net-35.json delete mode 100755 bin/csharp-petstore-net-35.sh delete mode 100644 bin/csharp-petstore-net-40.json delete mode 100755 bin/csharp-petstore-net-40.sh delete mode 100644 bin/csharp-petstore-net-standard.json delete mode 100755 bin/csharp-petstore-net-standard.sh delete mode 100755 bin/csharp-petstore-netcore-project.sh delete mode 100755 bin/csharp-petstore.sh delete mode 100755 bin/csharp-property-changed-petstore.sh delete mode 100755 bin/cwiki-petstore.sh delete mode 100755 bin/dart-dio-petstore.sh delete mode 100755 bin/dart-jaguar-petstore.sh delete mode 100755 bin/dart-petstore.sh delete mode 100755 bin/dart2-petstore.sh delete mode 100755 bin/dynamic-html.sh delete mode 100755 bin/eiffel-petstore.sh delete mode 100755 bin/elixir-petstore.sh delete mode 100755 bin/erlang-petstore-client.sh delete mode 100755 bin/erlang-petstore-proper.sh delete mode 100755 bin/erlang-petstore-server.sh delete mode 100644 bin/flash-petstore.json delete mode 100755 bin/flash-petstore.sh delete mode 100755 bin/fsharp-functions-server-petstore.sh delete mode 100755 bin/fsharp-giraffe-server-petstore.sh create mode 100755 bin/generate-samples.sh delete mode 100755 bin/go-experimental-petstore.sh delete mode 100755 bin/go-gin-petstore-server.sh delete mode 100755 bin/go-petstore-server.sh delete mode 100755 bin/go-petstore-withxml.sh delete mode 100755 bin/go-petstore.sh delete mode 100755 bin/graphql-nodejs-express-server.sh delete mode 100755 bin/graphql-schema-petstore.sh delete mode 100755 bin/groovy-petstore.sh delete mode 100755 bin/haskell-http-client-petstore.sh delete mode 100755 bin/haskell-servant-petstore.sh delete mode 100755 bin/html-markdown.sh delete mode 100755 bin/html-petstore.sh delete mode 100755 bin/html2-petstore.sh delete mode 100755 bin/java-inflector-petstore-server.sh delete mode 100755 bin/java-jaxrs-petstore-server-all.sh delete mode 100755 bin/java-msf4j-petstore-server.sh delete mode 100755 bin/java-petstore-all.sh delete mode 100644 bin/java-petstore-feign-10x.json delete mode 100755 bin/java-petstore-feign-10x.sh delete mode 100644 bin/java-petstore-google-api-client.json delete mode 100755 bin/java-petstore-google-api-client.sh delete mode 100755 bin/java-petstore-jersey1.sh delete mode 100644 bin/java-petstore-jersey2-java8.json delete mode 100755 bin/java-petstore-jersey2-java8.sh delete mode 100755 bin/java-petstore-microprofile.sh delete mode 100755 bin/java-petstore-native-async.sh delete mode 100644 bin/java-petstore-native.json delete mode 100755 bin/java-petstore-native.sh delete mode 100755 bin/java-petstore-okhttp-gson-parcelable.sh delete mode 100644 bin/java-petstore-okhttp-gson.json delete mode 100755 bin/java-petstore-okhttp-gson.sh delete mode 100644 bin/java-petstore-rest-assured-jackson.json delete mode 100755 bin/java-petstore-rest-assured-jackson.sh delete mode 100644 bin/java-petstore-rest-assured.json delete mode 100755 bin/java-petstore-rest-assured.sh delete mode 100755 bin/java-petstore-resteasy-all.sh delete mode 100644 bin/java-petstore-resteasy.json delete mode 100755 bin/java-petstore-resteasy.sh delete mode 100755 bin/java-petstore-resttemplate-withxml.sh delete mode 100644 bin/java-petstore-resttemplate.json delete mode 100755 bin/java-petstore-resttemplate.sh delete mode 100755 bin/java-petstore-retrofit2-all.sh delete mode 100644 bin/java-petstore-retrofit2-play24.json delete mode 100755 bin/java-petstore-retrofit2-play24.sh delete mode 100644 bin/java-petstore-retrofit2-play25.json delete mode 100755 bin/java-petstore-retrofit2-play25.sh delete mode 100644 bin/java-petstore-retrofit2-play26.json delete mode 100755 bin/java-petstore-retrofit2-play26.sh delete mode 100644 bin/java-petstore-retrofit2.json delete mode 100755 bin/java-petstore-retrofit2.sh delete mode 100644 bin/java-petstore-retrofit2rx.json delete mode 100755 bin/java-petstore-retrofit2rx.sh delete mode 100644 bin/java-petstore-retrofit2rx2.json delete mode 100755 bin/java-petstore-retrofit2rx2.sh delete mode 100644 bin/java-petstore-vertx.json delete mode 100755 bin/java-petstore-vertx.sh delete mode 100644 bin/java-petstore-webclient.json delete mode 100755 bin/java-petstore-webclient.sh delete mode 100755 bin/java-pkmst-petstore-server.sh delete mode 100755 bin/java-play-framework-petstore-server-all.sh delete mode 100755 bin/java-play-framework-petstore-server-api-package-override.sh delete mode 100755 bin/java-play-framework-petstore-server-async.json delete mode 100755 bin/java-play-framework-petstore-server-async.sh delete mode 100755 bin/java-play-framework-petstore-server-controller-only.sh delete mode 100755 bin/java-play-framework-petstore-server-fake-endpoints.sh delete mode 100755 bin/java-play-framework-petstore-server-no-bean-validation.sh delete mode 100755 bin/java-play-framework-petstore-server-no-exception-handling.sh delete mode 100755 bin/java-play-framework-petstore-server-no-interface.sh delete mode 100755 bin/java-play-framework-petstore-server-no-swagger-ui.sh delete mode 100755 bin/java-play-framework-petstore-server-no-wrap-calls.sh delete mode 100755 bin/java-play-framework-petstore-server.sh delete mode 100755 bin/java-undertow-petstore-server.sh delete mode 100755 bin/java-vertx-async-petstore-server.sh delete mode 100755 bin/java-vertx-rx-petstore-server.sh delete mode 100755 bin/java-vertx-web-rx-petstore-server.sh delete mode 100755 bin/javascript-apollo-petstore.sh delete mode 100755 bin/javascript-closure-angular.sh delete mode 100755 bin/javascript-es6-petstore.sh delete mode 100755 bin/javascript-flowtyped-petstore.sh delete mode 100755 bin/javascript-petstore-all.sh delete mode 100755 bin/javascript-promise-es6-petstore.sh delete mode 100755 bin/jaxrs-cxf-cdi-petstore-server.sh delete mode 100755 bin/jaxrs-cxf-client-petstore.sh delete mode 100755 bin/jaxrs-cxf-petstore-server-annotated-base-path.sh delete mode 100755 bin/jaxrs-cxf-petstore-server-non-spring-application.sh delete mode 100755 bin/jaxrs-cxf-petstore-server-test-data.sh delete mode 100755 bin/jaxrs-cxf-petstore-server.sh delete mode 100644 bin/jaxrs-datelib-j8.json delete mode 100755 bin/jaxrs-jersey1-petstore-server.sh delete mode 100755 bin/jaxrs-jersey1-usetags-petstore-server.sh delete mode 100755 bin/jaxrs-petstore-server-datelib-j8.sh delete mode 100755 bin/jaxrs-petstore-server.sh delete mode 100644 bin/jaxrs-resteasy-eap-java8-petstore-server.json delete mode 100755 bin/jaxrs-resteasy-eap-java8-petstore-server.sh delete mode 100644 bin/jaxrs-resteasy-eap-joda-petstore-server.json delete mode 100755 bin/jaxrs-resteasy-eap-joda-petstore-server.sh delete mode 100755 bin/jaxrs-resteasy-eap-petstore-server.sh delete mode 100644 bin/jaxrs-resteasy-joda-petstore-server.json delete mode 100755 bin/jaxrs-resteasy-joda-petstore-server.sh delete mode 100755 bin/jaxrs-resteasy-petstore-server.sh delete mode 100755 bin/jaxrs-spec-petstore-server-interface-returning-response.sh delete mode 100755 bin/jaxrs-spec-petstore-server-interface.sh delete mode 100755 bin/jaxrs-spec-petstore-server.sh delete mode 100755 bin/jaxrs-usetags-petstore-server.sh delete mode 100755 bin/jmeter-petstore.sh delete mode 100755 bin/k6-petstore.sh delete mode 100755 bin/kotlin-client-all.sh delete mode 100755 bin/kotlin-client-gson.sh delete mode 100755 bin/kotlin-client-jackson.sh delete mode 100755 bin/kotlin-client-json-request-string.sh delete mode 100755 bin/kotlin-client-moshi-codegen.sh delete mode 100755 bin/kotlin-client-nonpublic.sh delete mode 100755 bin/kotlin-client-nullable.sh delete mode 100755 bin/kotlin-client-okhttp3.sh delete mode 100755 bin/kotlin-client-petstore-multiplatform.sh delete mode 100755 bin/kotlin-client-petstore-okhttp-coroutines.sh delete mode 100755 bin/kotlin-client-petstore.sh delete mode 100755 bin/kotlin-client-retrofit2.sh delete mode 100755 bin/kotlin-client-string.sh delete mode 100755 bin/kotlin-client-threetenbp.sh delete mode 100755 bin/kotlin-client-uppercase-enum.sh delete mode 100755 bin/kotlin-server-petstore.sh delete mode 100755 bin/kotlin-springboot-petstore-all.sh delete mode 100755 bin/kotlin-springboot-petstore-server-model-mutable.sh delete mode 100755 bin/kotlin-springboot-petstore-server-reactive.sh delete mode 100755 bin/kotlin-springboot-petstore-server.sh delete mode 100755 bin/kotlin-vertx-server-petstore.sh delete mode 100755 bin/lua-petstore.sh delete mode 100755 bin/markdown-documentation-petstore.sh delete mode 100755 bin/mysql-schema-petstore.sh delete mode 100755 bin/nancyfx-petstore-server-async.sh delete mode 100755 bin/nancyfx-petstore-server.sh delete mode 100755 bin/nim-client-petstore.sh delete mode 100755 bin/nodejs-express-petstore-server.sh delete mode 100755 bin/objc-petstore-all.sh delete mode 100755 bin/objc-petstore-coredata.sh delete mode 100644 bin/objc-petstore.json delete mode 100755 bin/objc-petstore.sh delete mode 100755 bin/ocaml-petstore.sh delete mode 100755 bin/openapi3/android-petstore-all.sh delete mode 100755 bin/openapi3/android-petstore-httpclient.sh delete mode 100755 bin/openapi3/android-petstore-volley.sh delete mode 100755 bin/openapi3/avro-petstore.sh delete mode 100755 bin/openapi3/bash-petstore.sh delete mode 100755 bin/openapi3/clojure-petstore.sh delete mode 100755 bin/openapi3/cpp-pistache-server-petstore.sh delete mode 100755 bin/openapi3/cpp-qt5-petstore.sh delete mode 100755 bin/openapi3/cpp-qt5-qhttpengine-server-petstore.sh delete mode 100755 bin/openapi3/cpp-restbed-petstore-server.sh delete mode 100755 bin/openapi3/cpp-tizen-petstore.sh delete mode 100755 bin/openapi3/csharp-dotnet2-petstore.sh delete mode 100755 bin/openapi3/csharp-petstore-net-standard.sh delete mode 100755 bin/openapi3/csharp-petstore.sh delete mode 100755 bin/openapi3/csharp-property-changed-petstore.sh delete mode 100755 bin/openapi3/dart-petstore.sh delete mode 100755 bin/openapi3/elixir-petstore.sh delete mode 100755 bin/openapi3/elm.sh delete mode 100755 bin/openapi3/finch-petstore-server.sh delete mode 100755 bin/openapi3/flash-petstore.sh delete mode 100755 bin/openapi3/go-experimental-petstore.sh delete mode 100755 bin/openapi3/go-gin-petstore-server.sh delete mode 100755 bin/openapi3/go-petstore-server.sh delete mode 100755 bin/openapi3/go-petstore.sh delete mode 100755 bin/openapi3/graphql-nodejs-express-server.sh delete mode 100755 bin/openapi3/haskell-http-client-petstore.sh delete mode 100755 bin/openapi3/haskell-servant-petstore.sh delete mode 100644 bin/openapi3/java-petstore-jersey2-java8.json delete mode 100755 bin/openapi3/java-petstore-jersey2-java8.sh delete mode 100755 bin/openapi3/javascript-closure-angular.sh delete mode 100755 bin/openapi3/jaxrs-cxf-client-petstore.sh delete mode 100755 bin/openapi3/jaxrs-jersey-petstore.sh delete mode 100755 bin/openapi3/kotlin-client-petstore-all.sh delete mode 100644 bin/openapi3/kotlin-client-petstore-deprecated.sh delete mode 100755 bin/openapi3/kotlin-client-petstore-multiplatform.sh delete mode 100644 bin/openapi3/kotlin-client-petstore-nullable-required.sh delete mode 100755 bin/openapi3/kotlin-client-petstore-retrofit2-coroutines.sh delete mode 100755 bin/openapi3/kotlin-client-petstore-retrofit2-rx.sh delete mode 100755 bin/openapi3/kotlin-client-petstore-retrofit2-rx2.sh delete mode 100755 bin/openapi3/kotlin-client-petstore.sh delete mode 100755 bin/openapi3/kotlin-springboot-petstore-all.sh delete mode 100755 bin/openapi3/kotlin-springboot-petstore-server-reactive.sh delete mode 100755 bin/openapi3/kotlin-springboot-petstore-server.sh delete mode 100755 bin/openapi3/objc-petstore-coredata.sh delete mode 100755 bin/openapi3/objc-petstore.sh delete mode 100755 bin/openapi3/perl-petstore.sh delete mode 100755 bin/openapi3/php-laravel-petstore.sh delete mode 100755 bin/openapi3/php-lumen-petstore-server.sh delete mode 100755 bin/openapi3/php-petstore.sh delete mode 100755 bin/openapi3/php-silex-petstore-server.sh delete mode 100755 bin/openapi3/php-slim-server-petstore.sh delete mode 100755 bin/openapi3/php-slim4-server-petstore.sh delete mode 100755 bin/openapi3/php-symfony-petstore.sh delete mode 100644 bin/openapi3/php-ze-ph-petstore-server.sh delete mode 100644 bin/openapi3/plantuml-documentation-petstore.sh delete mode 100755 bin/openapi3/python-experimental-petstore.sh delete mode 100755 bin/openapi3/python-flask-petstore-python2.sh delete mode 100755 bin/openapi3/python-flask-petstore.sh delete mode 100755 bin/openapi3/python-petstore.sh delete mode 100755 bin/openapi3/r-petstore.sh delete mode 100755 bin/openapi3/run-all-petstore delete mode 100755 bin/openapi3/rust-petstore.sh delete mode 100755 bin/openapi3/typescript-angular-petstore-all.sh delete mode 100755 bin/openapi3/typescript-angular-v2-petstore-interfaces.sh delete mode 100755 bin/openapi3/typescript-angular-v2-petstore-with-npm.sh delete mode 100755 bin/openapi3/typescript-angular-v2-petstore.sh delete mode 100755 bin/openapi3/typescript-angular-v4-petstore-with-npm.sh delete mode 100755 bin/openapi3/typescript-angular-v4.3-petstore-with-npm.sh delete mode 100755 bin/openapi3/typescript-angularjs-petstore.sh delete mode 100755 bin/openapi3/typescript-aurelia-petstore.sh delete mode 100755 bin/openapi3/typescript-fetch-petstore-all.sh delete mode 100755 bin/openapi3/typescript-fetch-petstore-interfaces.sh delete mode 100755 bin/openapi3/typescript-fetch-petstore-prefix-parameter-interfaces.sh delete mode 100755 bin/openapi3/typescript-fetch-petstore-target-es6.sh delete mode 100755 bin/openapi3/typescript-fetch-petstore-with-npm-version.sh delete mode 100755 bin/openapi3/typescript-fetch-petstore.sh delete mode 100755 bin/openapi3/typescript-inversify-petstore.sh delete mode 100755 bin/openapi3/typescript-jquery-petstore-all.sh delete mode 100755 bin/openapi3/typescript-jquery-petstore-with-npm.sh delete mode 100755 bin/openapi3/typescript-jquery-petstore.sh delete mode 100755 bin/openapi3/typescript-node-petstore-all.sh delete mode 100755 bin/openapi3/typescript-node-petstore-with-npm.sh delete mode 100755 bin/openapi3/typescript-node-petstore.sh delete mode 100644 bin/openapi3/windows/csharp-netcore-petstore-netcore.bat delete mode 100644 bin/openapi3/windows/csharp-netcore-petstore.bat delete mode 100755 bin/openapi3/windows/csharp-petstore.bat delete mode 100644 bin/openapi3/windows/kotlin-client-deprecated.bat delete mode 100644 bin/openapi3/windows/kotlin-client-nullable-required.bat delete mode 100644 bin/openapi3/windows/kotlin-springboot-petstore-server.bat delete mode 100755 bin/openapi3/windows/nodejs-express-server-petstore.bat delete mode 100644 bin/openapi3/windows/php-petstore.bat delete mode 100644 bin/openapi3/windows/plantuml-documentation-petstore.bat delete mode 100644 bin/openapi3/windows/python-experimental-petstore.bat delete mode 100755 bin/openapi3/windows/r-petstore.bat delete mode 100644 bin/openapi3/windows/run-all-petstore.cmd delete mode 100755 bin/openapi3/windows/scala-sttp-petstore.bat delete mode 100755 bin/perl-deep-module-petstore.sh delete mode 100755 bin/perl-petstore-all.sh delete mode 100755 bin/perl-petstore.sh delete mode 100755 bin/php-laravel-petstore-server.sh delete mode 100755 bin/php-lumen-petstore-server.sh delete mode 100755 bin/php-petstore.sh delete mode 100755 bin/php-silex-petstore-server.sh delete mode 100755 bin/php-slim-server-petstore.sh delete mode 100755 bin/php-slim4-server-petstore.sh delete mode 100755 bin/php-symfony-petstore.sh delete mode 100755 bin/php-ze-ph-petstore-server.sh delete mode 100755 bin/plantuml-documentation-petstore.sh delete mode 100644 bin/powershell-config.json delete mode 100755 bin/powershell-petstore.sh delete mode 100755 bin/protobuf-schema-petstore.sh delete mode 100755 bin/python-asyncio-petstore.sh delete mode 100755 bin/python-experimental-petstore.sh delete mode 100755 bin/python-petstore-all.sh delete mode 100755 bin/python-petstore.sh delete mode 100755 bin/python-server-aiohttp-petstore.sh delete mode 100755 bin/python-server-aiohttp-srclayout-petstore.sh delete mode 100755 bin/python-server-all.sh delete mode 100755 bin/python-server-blueplanet-petstore.sh delete mode 100755 bin/python-server-flask-petstore-python2.sh delete mode 100755 bin/python-server-flask-petstore.sh delete mode 100755 bin/python-tornado-petstore.sh delete mode 100755 bin/r-petstore.sh delete mode 100755 bin/ruby-client-petstore-faraday.sh delete mode 100755 bin/ruby-client-petstore.sh delete mode 100755 bin/ruby-on-rails-server-petstore.sh delete mode 100644 bin/ruby-petstore-faraday.json delete mode 100644 bin/ruby-petstore.json delete mode 100755 bin/ruby-sinatra-server-petstore.sh delete mode 100755 bin/run-all-petstore delete mode 100755 bin/rust-petstore-reqwest-async.sh delete mode 100755 bin/rust-petstore.sh delete mode 100755 bin/rust-server-petstore.sh delete mode 100755 bin/scala-akka-http-server-petstore.sh delete mode 100755 bin/scala-akka-petstore.sh delete mode 100755 bin/scala-finch-petstore-server.sh delete mode 100755 bin/scala-gatling-petstore.sh delete mode 100755 bin/scala-httpclient-petstore.sh delete mode 100755 bin/scala-lagom-server-petstore.sh delete mode 100755 bin/scala-play-framework-petstore.sh delete mode 100755 bin/scala-sttp-petstore.sh delete mode 100755 bin/scalatra-petstore-server.sh delete mode 100755 bin/scalaz-petstore.sh delete mode 100755 bin/spring-all-petstore.sh delete mode 100755 bin/spring-cloud-feign-async-petstore.sh delete mode 100644 bin/spring-cloud-feign-petstore.json delete mode 100755 bin/spring-cloud-feign-petstore.sh delete mode 100755 bin/spring-delegate-j8.sh delete mode 100755 bin/spring-delegate.sh delete mode 100755 bin/spring-mvc-petstore-j8-async-server.sh delete mode 100644 bin/spring-mvc-petstore-j8-async.json delete mode 100644 bin/spring-mvc-petstore-j8-localdatetime.json delete mode 100755 bin/spring-mvc-petstore-j8-localdatetime.sh delete mode 100644 bin/spring-mvc-petstore-server.json delete mode 100755 bin/spring-mvc-petstore-server.sh delete mode 100755 bin/spring-stubs.sh delete mode 100644 bin/springboot-petstore-server-beanvalidation.json delete mode 100755 bin/springboot-petstore-server-beanvalidation.sh delete mode 100644 bin/springboot-petstore-server-implicitHeaders.json delete mode 100755 bin/springboot-petstore-server-implicitHeaders.sh delete mode 100755 bin/springboot-petstore-server-reactive.sh delete mode 100644 bin/springboot-petstore-server-useOptional.json delete mode 100755 bin/springboot-petstore-server-useOptional.sh delete mode 100755 bin/springboot-petstore-server.sh delete mode 100644 bin/springboot-virtualan-petstore-server.json delete mode 100755 bin/springboot-virtualan-petstore-server.sh delete mode 100644 bin/supportPython2.json delete mode 100755 bin/swift5-all.sh delete mode 100644 bin/swift5-petstore-alamofire.json delete mode 100755 bin/swift5-petstore-alamofire.sh delete mode 100755 bin/swift5-petstore-all.sh delete mode 100644 bin/swift5-petstore-combine.json delete mode 100755 bin/swift5-petstore-combine.sh delete mode 100644 bin/swift5-petstore-deprecated.json delete mode 100755 bin/swift5-petstore-deprecated.sh delete mode 100644 bin/swift5-petstore-nonPublicApi.json delete mode 100755 bin/swift5-petstore-nonPublicApi.sh delete mode 100644 bin/swift5-petstore-objcCompatible.json delete mode 100755 bin/swift5-petstore-objcCompatible.sh delete mode 100644 bin/swift5-petstore-promisekit.json delete mode 100755 bin/swift5-petstore-promisekit.sh delete mode 100755 bin/swift5-petstore-readOnlyProperties.sh delete mode 100644 bin/swift5-petstore-readonlyProperties.json delete mode 100644 bin/swift5-petstore-result.json delete mode 100755 bin/swift5-petstore-result.sh delete mode 100644 bin/swift5-petstore-rxswift.json delete mode 100755 bin/swift5-petstore-rxswift.sh delete mode 100644 bin/swift5-petstore-urlsession.json delete mode 100755 bin/swift5-petstore-urlsession.sh delete mode 100644 bin/swift5-petstore.json delete mode 100755 bin/swift5-petstore.sh delete mode 100644 bin/swift5-test.json delete mode 100755 bin/swift5-test.sh delete mode 100755 bin/typescript-angular-petstore-all.sh delete mode 100644 bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.json delete mode 100755 bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.sh delete mode 100755 bin/typescript-angular-v6-petstore-not-provided-in-root.sh delete mode 100644 bin/typescript-angular-v6-petstore-provided-in-root-with-npm.json delete mode 100755 bin/typescript-angular-v6-petstore-provided-in-root-with-npm.sh delete mode 100755 bin/typescript-angular-v6-petstore-provided-in-root.sh delete mode 100644 bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.json delete mode 100755 bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.sh delete mode 100755 bin/typescript-angular-v7-petstore-not-provided-in-root.sh delete mode 100644 bin/typescript-angular-v7-petstore-provided-in-root-with-npm.json delete mode 100755 bin/typescript-angular-v7-petstore-provided-in-root-with-npm.sh delete mode 100755 bin/typescript-angular-v7-petstore-provided-in-root.sh delete mode 100644 bin/typescript-angular-v8-petstore-provided-in-root-with-npm.json delete mode 100755 bin/typescript-angular-v8-petstore-provided-in-root-with-npm.sh delete mode 100755 bin/typescript-angular-v8-petstore-provided-in-root-with-prefixed-module-name.sh delete mode 100755 bin/typescript-angular-v8-petstore-single-request-parameter.sh delete mode 100755 bin/typescript-angularjs-petstore.sh delete mode 100755 bin/typescript-aurelia-petstore.sh delete mode 100755 bin/typescript-axios-petstore-all.sh delete mode 100755 bin/typescript-axios-petstore-composed-schemas.sh delete mode 100755 bin/typescript-axios-petstore-interfaces.sh delete mode 100755 bin/typescript-axios-petstore-target-es6.json delete mode 100755 bin/typescript-axios-petstore-target-es6.sh delete mode 100755 bin/typescript-axios-petstore-with-complex-headers.sh delete mode 100755 bin/typescript-axios-petstore-with-npm-version-and-separate-models-and-api.json delete mode 100755 bin/typescript-axios-petstore-with-npm-version-and-separate-models-and-api.sh delete mode 100755 bin/typescript-axios-petstore-with-npm-version.json delete mode 100755 bin/typescript-axios-petstore-with-npm-version.sh delete mode 100755 bin/typescript-axios-petstore-with-single-request-parameters.sh delete mode 100755 bin/typescript-axios-petstore.sh delete mode 100755 bin/typescript-fetch-petstore-all.sh delete mode 100755 bin/typescript-fetch-petstore-interfaces.sh delete mode 100644 bin/typescript-fetch-petstore-multiple-parameters.json delete mode 100755 bin/typescript-fetch-petstore-multiple-parameters.sh delete mode 100644 bin/typescript-fetch-petstore-prefix-parameter-interfaces.json delete mode 100755 bin/typescript-fetch-petstore-prefix-parameter-interfaces.sh delete mode 100644 bin/typescript-fetch-petstore-target-es6.json delete mode 100755 bin/typescript-fetch-petstore-target-es6.sh delete mode 100644 bin/typescript-fetch-petstore-typescript-three-plus.json delete mode 100755 bin/typescript-fetch-petstore-typescript-three-plus.sh delete mode 100644 bin/typescript-fetch-petstore-with-npm-version.json delete mode 100755 bin/typescript-fetch-petstore-with-npm-version.sh delete mode 100755 bin/typescript-fetch-petstore.sh delete mode 100755 bin/typescript-inversify-petstore.sh delete mode 100755 bin/typescript-jquery-petstore-all.sh delete mode 100644 bin/typescript-jquery-petstore-npm.json delete mode 100755 bin/typescript-jquery-petstore-with-npm.sh delete mode 100755 bin/typescript-jquery-petstore.sh delete mode 100755 bin/typescript-node-petstore-all.sh delete mode 100644 bin/typescript-node-petstore-npm.json delete mode 100755 bin/typescript-node-petstore-with-npm.sh delete mode 100755 bin/typescript-node-petstore.sh delete mode 100644 bin/typescript-petstore-npm.json delete mode 100644 bin/typescript-redux-query-petstore-with-npm-version.json delete mode 100755 bin/typescript-redux-query-petstore-with-npm-version.sh delete mode 100755 bin/typescript-redux-query-petstore.sh delete mode 100755 bin/typescript-rxjs-petstore-all.sh delete mode 100755 bin/typescript-rxjs-petstore-interfaces.sh delete mode 100644 bin/typescript-rxjs-petstore-target-es6.json delete mode 100755 bin/typescript-rxjs-petstore-target-es6.sh delete mode 100644 bin/typescript-rxjs-petstore-with-npm-version.json delete mode 100755 bin/typescript-rxjs-petstore-with-npm-version.sh delete mode 100755 bin/typescript-rxjs-petstore.sh delete mode 100755 bin/windows/android-petstore-all.bat delete mode 100755 bin/windows/android-petstore-httpclient.bat delete mode 100755 bin/windows/android-petstore-volley.bat delete mode 100755 bin/windows/android-petstore.bat delete mode 100644 bin/windows/apache2-petstore-config.bat delete mode 100755 bin/windows/apex-petstore.bat delete mode 100644 bin/windows/asciidoc-documentation-petstore.bat delete mode 100755 bin/windows/aspnetcore-petstore-server.bat delete mode 100644 bin/windows/aspnetcore3-petstore-server.bat delete mode 100755 bin/windows/c-petstore.bat delete mode 100755 bin/windows/clojure-petstore.bat delete mode 100644 bin/windows/cpp-pistache-server-petstore.bat delete mode 100755 bin/windows/cpp-qt5-petstore.bat delete mode 100644 bin/windows/cpp-qt5-qhttpengine-server-petstore.bat delete mode 100644 bin/windows/cpp-restbed-petstore-server.bat delete mode 100755 bin/windows/cpp-restsdk-petstore.bat delete mode 100755 bin/windows/cpp-tizen-petstore.bat delete mode 100644 bin/windows/cpp-ue4-petstore.bat delete mode 100755 bin/windows/csharp-dotnet2-petstore.bat delete mode 100644 bin/windows/csharp-netcore-petstore-all.bat delete mode 100644 bin/windows/csharp-netcore-petstore-netcore.bat delete mode 100644 bin/windows/csharp-netcore-petstore.bat delete mode 100755 bin/windows/csharp-petstore-all.bat delete mode 100644 bin/windows/csharp-petstore-net-35.bat delete mode 100644 bin/windows/csharp-petstore-net-40.bat delete mode 100644 bin/windows/csharp-petstore-netcore-project.bat delete mode 100644 bin/windows/csharp-petstore-netstandard.bat delete mode 100755 bin/windows/csharp-petstore.bat delete mode 100644 bin/windows/csharp-property-changed-petstore.bat delete mode 100755 bin/windows/dart-client-petstore.bat delete mode 100755 bin/windows/dart-dio-petstore.bat delete mode 100755 bin/windows/dart-petstore.bat delete mode 100755 bin/windows/dynamic-html-petstore.bat delete mode 100644 bin/windows/eiffel-petstore.bat delete mode 100755 bin/windows/elm-petstore.bat delete mode 100755 bin/windows/erlang-petstore-client.bat delete mode 100755 bin/windows/erlang-petstore-server.bat delete mode 100755 bin/windows/flash-petstore.bat delete mode 100644 bin/windows/fsharp-functions-server-petstore.bat delete mode 100644 bin/windows/fsharp-giraffe-server-petstore.bat delete mode 100755 bin/windows/go-experimental-petstore.bat delete mode 100644 bin/windows/go-gin-petstore-server.bat delete mode 100644 bin/windows/go-petstore-server.bat delete mode 100644 bin/windows/go-petstore-withxml.bat delete mode 100755 bin/windows/go-petstore.bat delete mode 100755 bin/windows/graphql-nodejs-express-petstore-server.bat delete mode 100755 bin/windows/graphql-schema-petstore.bat delete mode 100644 bin/windows/groovy-petstore.bat delete mode 100755 bin/windows/haskell-http-client-petstore.bat delete mode 100755 bin/windows/html-petstore.bat delete mode 100644 bin/windows/html2-petstore.bat delete mode 100644 bin/windows/java-petstore-all.bat delete mode 100644 bin/windows/java-petstore-feign-10x.bat delete mode 100644 bin/windows/java-petstore-google-api-client.bat delete mode 100644 bin/windows/java-petstore-jersey1.bat delete mode 100644 bin/windows/java-petstore-jersey2-java8.bat delete mode 100755 bin/windows/java-petstore-microprofile.bat delete mode 100644 bin/windows/java-petstore-native.bat delete mode 100644 bin/windows/java-petstore-okhttp-gson-parcelable.bat delete mode 100755 bin/windows/java-petstore-okhttp-gson.bat delete mode 100644 bin/windows/java-petstore-rest-assured-jackson.bat delete mode 100644 bin/windows/java-petstore-rest-assured.bat delete mode 100644 bin/windows/java-petstore-resttemplate-resteasy.bat delete mode 100644 bin/windows/java-petstore-resttemplate-webclient.bat delete mode 100644 bin/windows/java-petstore-resttemplate-withxml.bat delete mode 100644 bin/windows/java-petstore-resttemplate.bat delete mode 100644 bin/windows/java-petstore-retrofit2-all.bat delete mode 100644 bin/windows/java-petstore-retrofit2-play24.bat delete mode 100644 bin/windows/java-petstore-retrofit2-play25.bat delete mode 100644 bin/windows/java-petstore-retrofit2-play26.bat delete mode 100644 bin/windows/java-petstore-retrofit2.bat delete mode 100644 bin/windows/java-petstore-retrofit2rx.bat delete mode 100644 bin/windows/java-petstore-retrofit2rx2.bat delete mode 100644 bin/windows/java-petstore-vertx.bat delete mode 100644 bin/windows/java-petstore-webclient.bat delete mode 100644 bin/windows/java-pkmst-petstore-server.bat delete mode 100644 bin/windows/java-play-framework-petstore-server.bat delete mode 100644 bin/windows/java-vertx-async-petstore-server.bat delete mode 100644 bin/windows/java-vertx-rx-petstore-server.bat delete mode 100755 bin/windows/javascript-apollo-petstore.bat delete mode 100644 bin/windows/javascript-es6-petstore.bat delete mode 100755 bin/windows/javascript-petstore-all.bat delete mode 100644 bin/windows/javascript-promise-es6-petstore.bat delete mode 100755 bin/windows/javascript-promise-petstore.bat delete mode 100644 bin/windows/jaxrs-cxf-cdi-petstore-server.bat delete mode 100755 bin/windows/jaxrs-cxf-client-petstore.bat delete mode 100644 bin/windows/jaxrs-cxf-petstore-server-annotated-base-path.bat delete mode 100644 bin/windows/jaxrs-cxf-petstore-server-non-spring-application.bat delete mode 100644 bin/windows/jaxrs-cxf-petstore-server-test-data.bat delete mode 100644 bin/windows/jaxrs-cxf-petstore-server.bat delete mode 100644 bin/windows/jaxrs-spec-petstore-server-interface.bat delete mode 100644 bin/windows/jaxrs-spec-petstore-server.bat delete mode 100755 bin/windows/k6-petstore.bat delete mode 100644 bin/windows/kotlin-client-all.bat delete mode 100644 bin/windows/kotlin-client-gson.bat delete mode 100644 bin/windows/kotlin-client-json-request-string.bat delete mode 100644 bin/windows/kotlin-client-moshi-codegen.bat delete mode 100644 bin/windows/kotlin-client-nonpublic.bat delete mode 100644 bin/windows/kotlin-client-nullable.bat delete mode 100644 bin/windows/kotlin-client-okhttp3.bat delete mode 100644 bin/windows/kotlin-client-petstore-multiplatform.bat delete mode 100644 bin/windows/kotlin-client-petstore.bat delete mode 100644 bin/windows/kotlin-client-retrofit2.bat delete mode 100644 bin/windows/kotlin-client-string.bat delete mode 100644 bin/windows/kotlin-client-threetenbp.bat delete mode 100644 bin/windows/kotlin-server-petstore.bat delete mode 100644 bin/windows/kotlin-springboot-petstore-server.bat delete mode 100644 bin/windows/kotlin-vertx-server-petstore.bat delete mode 100755 bin/windows/lua-petstore.bat delete mode 100644 bin/windows/markdown-documentation-petstore.bat delete mode 100755 bin/windows/mysql-schema-petstore.bat delete mode 100644 bin/windows/nancyfx-petstore-server.bat delete mode 100644 bin/windows/nim-client-petstore.bat delete mode 100755 bin/windows/objc-petstore.bat delete mode 100755 bin/windows/ocaml-petstore.bat delete mode 100755 bin/windows/perl-petstore.bat delete mode 100644 bin/windows/php-lumen-petstore-server.bat delete mode 100755 bin/windows/php-petstore.bat delete mode 100644 bin/windows/php-silex-petstore-server.bat delete mode 100755 bin/windows/php-slim-server-petstore.bat delete mode 100644 bin/windows/php-slim4-server-petstore.bat delete mode 100644 bin/windows/php-symfony-petstore-server.bat delete mode 100644 bin/windows/php-ze-ph-petstore-server.bat delete mode 100644 bin/windows/plantuml-documentation-petstore.bat delete mode 100755 bin/windows/powershell-petstore.bat delete mode 100755 bin/windows/protobuf-schema-petstore.bat delete mode 100644 bin/windows/python-experimental-petstore.bat delete mode 100755 bin/windows/python-petstore.bat delete mode 100755 bin/windows/python2-flask-petstore.bat delete mode 100755 bin/windows/python3-flask-petstore.bat delete mode 100755 bin/windows/r-petstore.bat delete mode 100755 bin/windows/rails5-petstore-server.bat delete mode 100755 bin/windows/ruby-client-petstore.bat delete mode 100644 bin/windows/run-all-petstore.cmd delete mode 100644 bin/windows/rust-petstore.bat delete mode 100755 bin/windows/rust-server-petstore.bat delete mode 100644 bin/windows/scala-akka-http-server-petstore.bat delete mode 100755 bin/windows/scala-akka-petstore.bat delete mode 100755 bin/windows/scala-gatling-petstore.sh delete mode 100755 bin/windows/scala-httpclient-petstore.bat delete mode 100644 bin/windows/scala-lagom-petstore.bat delete mode 100755 bin/windows/scala-play-framework-petstore.bat delete mode 100644 bin/windows/spring-mvc-petstore-j8-async-server.bat delete mode 100644 bin/windows/spring-mvc-petstore-server.bat delete mode 100644 bin/windows/springboot-petstore-server.bat delete mode 100755 bin/windows/swift5-all.bat delete mode 100755 bin/windows/swift5-petstore-alamofire.bat delete mode 100755 bin/windows/swift5-petstore-all.bat delete mode 100755 bin/windows/swift5-petstore-combine.bat delete mode 100755 bin/windows/swift5-petstore-nonPublicApi.bat delete mode 100755 bin/windows/swift5-petstore-objcCompatible.bat delete mode 100755 bin/windows/swift5-petstore-promisekit.bat delete mode 100644 bin/windows/swift5-petstore-readonlyProperties.bat delete mode 100755 bin/windows/swift5-petstore-result.bat delete mode 100755 bin/windows/swift5-petstore-rxswift.bat delete mode 100755 bin/windows/swift5-petstore-urlSession.bat delete mode 100755 bin/windows/swift5-petstore.bat delete mode 100755 bin/windows/swift5-test.bat delete mode 100644 bin/windows/typescript-angular-petstore-all.bat delete mode 100644 bin/windows/typescript-angular-v6-not-provided-in-root-with-npm.bat delete mode 100644 bin/windows/typescript-angular-v6-not-provided-in-root.bat delete mode 100644 bin/windows/typescript-angular-v6-provided-in-root-with-npm.bat delete mode 100644 bin/windows/typescript-angular-v6-provided-in-root.bat delete mode 100644 bin/windows/typescript-angular-v7-not-provided-in-root-with-npm.bat delete mode 100644 bin/windows/typescript-angular-v7-not-provided-in-root.bat delete mode 100644 bin/windows/typescript-angular-v7-provided-in-root-with-npm.bat delete mode 100644 bin/windows/typescript-angular-v7-provided-in-root.bat delete mode 100644 bin/windows/typescript-angular-v8-petstore-provided-in-root-with-prefixed-module-name.bat delete mode 100644 bin/windows/typescript-angular-v8-provided-in-root-with-npm.bat delete mode 100644 bin/windows/typescript-angular-v8-single-request-parameter.bat delete mode 100755 bin/windows/typescript-angularjs.bat delete mode 100644 bin/windows/typescript-aurelia-petstore.bat delete mode 100644 bin/windows/typescript-axios-petstore-all.bat delete mode 100644 bin/windows/typescript-axios-petstore-composed-schemas.bat delete mode 100644 bin/windows/typescript-axios-petstore-interfaces.bat delete mode 100644 bin/windows/typescript-axios-petstore-target-es6.bat delete mode 100755 bin/windows/typescript-axios-petstore-with-complex-headers.bat delete mode 100644 bin/windows/typescript-axios-petstore-with-npm-version-and-separate-models-and-api.bat delete mode 100644 bin/windows/typescript-axios-petstore-with-npm-version.bat delete mode 100755 bin/windows/typescript-axios-petstore-with-single-request-parameters.bat delete mode 100644 bin/windows/typescript-axios-petstore.bat delete mode 100644 bin/windows/typescript-fetch-petstore-all.bat delete mode 100644 bin/windows/typescript-fetch-petstore-interfaces.bat delete mode 100644 bin/windows/typescript-fetch-petstore-multiple-parameters.bat delete mode 100644 bin/windows/typescript-fetch-petstore-prefix-parameter-interfaces.bat delete mode 100644 bin/windows/typescript-fetch-petstore-target-es6.bat delete mode 100644 bin/windows/typescript-fetch-petstore-typescript-three-plus.bat delete mode 100644 bin/windows/typescript-fetch-petstore-with-npm-version.bat delete mode 100644 bin/windows/typescript-fetch-petstore.bat delete mode 100644 bin/windows/typescript-inversify-petstore.bat delete mode 100644 bin/windows/typescript-jquery-with-npm.bat delete mode 100644 bin/windows/typescript-jquery.bat delete mode 100644 bin/windows/typescript-node-petstore-all.bat delete mode 100755 bin/windows/typescript-node-petstore-with-npm.bat delete mode 100755 bin/windows/typescript-node-petstore.bat delete mode 100755 bin/windows/typescript-redux-query-petstore-with-npm.bat delete mode 100644 bin/windows/typescript-redux-query-petstore.bat delete mode 100644 bin/windows/typescript-rxjs-petstore-all.bat delete mode 100644 bin/windows/typescript-rxjs-petstore-interfaces.bat delete mode 100644 bin/windows/typescript-rxjs-petstore-target-es6.bat delete mode 100644 bin/windows/typescript-rxjs-petstore-with-npm-version.bat delete mode 100644 bin/windows/typescript-rxjs-petstore.bat delete mode 100644 bin/windows/ze-ph-petstore.bat create mode 100644 samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject.cls create mode 100644 samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject.cls-meta.xml create mode 100644 samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject1.cls create mode 100644 samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject1.cls-meta.xml create mode 100644 samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject1Test.cls create mode 100644 samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject1Test.cls-meta.xml create mode 100644 samples/client/petstore/apex/force-app/main/default/classes/OASInlineObjectTest.cls create mode 100644 samples/client/petstore/apex/force-app/main/default/classes/OASInlineObjectTest.cls-meta.xml create mode 100644 samples/client/petstore/ruby-faraday/docs/InlineObject.md create mode 100644 samples/client/petstore/ruby-faraday/docs/InlineObject1.md create mode 100644 samples/client/petstore/ruby-faraday/docs/InlineObject2.md create mode 100644 samples/client/petstore/ruby-faraday/docs/InlineObject3.md create mode 100644 samples/client/petstore/ruby-faraday/docs/InlineObject4.md create mode 100644 samples/client/petstore/ruby-faraday/docs/InlineObject5.md create mode 100644 samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object.rb create mode 100644 samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object1.rb create mode 100644 samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object2.rb create mode 100644 samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object3.rb create mode 100644 samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object4.rb create mode 100644 samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object5.rb create mode 100644 samples/client/petstore/ruby-faraday/spec/models/inline_object1_spec.rb create mode 100644 samples/client/petstore/ruby-faraday/spec/models/inline_object2_spec.rb create mode 100644 samples/client/petstore/ruby-faraday/spec/models/inline_object3_spec.rb create mode 100644 samples/client/petstore/ruby-faraday/spec/models/inline_object4_spec.rb create mode 100644 samples/client/petstore/ruby-faraday/spec/models/inline_object5_spec.rb create mode 100644 samples/client/petstore/ruby-faraday/spec/models/inline_object_spec.rb create mode 100644 samples/client/petstore/ruby/docs/InlineObject.md create mode 100644 samples/client/petstore/ruby/docs/InlineObject1.md create mode 100644 samples/client/petstore/ruby/docs/InlineObject2.md create mode 100644 samples/client/petstore/ruby/docs/InlineObject3.md create mode 100644 samples/client/petstore/ruby/docs/InlineObject4.md create mode 100644 samples/client/petstore/ruby/docs/InlineObject5.md create mode 100644 samples/client/petstore/ruby/lib/petstore/models/inline_object.rb create mode 100644 samples/client/petstore/ruby/lib/petstore/models/inline_object1.rb create mode 100644 samples/client/petstore/ruby/lib/petstore/models/inline_object2.rb create mode 100644 samples/client/petstore/ruby/lib/petstore/models/inline_object3.rb create mode 100644 samples/client/petstore/ruby/lib/petstore/models/inline_object4.rb create mode 100644 samples/client/petstore/ruby/lib/petstore/models/inline_object5.rb create mode 100644 samples/client/petstore/ruby/spec/models/inline_object1_spec.rb create mode 100644 samples/client/petstore/ruby/spec/models/inline_object2_spec.rb create mode 100644 samples/client/petstore/ruby/spec/models/inline_object3_spec.rb create mode 100644 samples/client/petstore/ruby/spec/models/inline_object4_spec.rb create mode 100644 samples/client/petstore/ruby/spec/models/inline_object5_spec.rb create mode 100644 samples/client/petstore/ruby/spec/models/inline_object_spec.rb create mode 100644 samples/client/petstore/typescript-fetch/tests/default/.openapi-generator-ignore create mode 100644 samples/server/petstore/jaxrs-cxf-test-data/.openapi-generator/FILES create mode 100644 samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/BigCat.java create mode 100644 samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/BigCatAllOf.java create mode 100644 samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/CatAllOf.java create mode 100644 samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/DogAllOf.java diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index a6064478b9..6b2da4c58b 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -4,7 +4,7 @@ ### PR checklist - [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md). -- [ ] If contributing template-only or documentation-only changes which will change sample output, [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) before. -- [ ] Run the shell script(s) under `./bin/` (or Windows batch scripts under`.\bin\windows`) to update Petstore samples related to your fix. This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run `./bin/{LANG}-petstore.sh`, `./bin/openapi3/{LANG}-petstore.sh` if updating the code or mustache templates for a language (`{LANG}`) (e.g. php, ruby, python, etc). +- [ ] If contributing template-only or documentation-only changes which will change sample output, [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) beforehand. +- [ ] Run the shell script `./bin/generate-samples.sh`to update all Petstore samples related to your fix. This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/config/java*`. - [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `4.3.x`, `5.0.x`. Default: `master`. - [ ] Copy the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) to review the pull request if your PR is targeting a particular programming language. diff --git a/CI/.drone.yml b/CI/.drone.yml index 3cb1983fbb..55d437c07d 100644 --- a/CI/.drone.yml +++ b/CI/.drone.yml @@ -38,6 +38,6 @@ steps: # generate test scripts - /bin/bash bin/tests/run-all-test # generate all petstore samples (client, servers, doc) - - /bin/bash bin/run-all-petstore + - /bin/bash bin/generate-samples.sh # generate all petstore samples (openapi3) - - /bin/bash bin/openapi3/run-all-petstore + - /bin/bash bin/generate-samples.sh bin/configs/other/*.yaml diff --git a/CI/bitrise.yml b/CI/bitrise.yml index de1bf901f2..73d2e2b29a 100644 --- a/CI/bitrise.yml +++ b/CI/bitrise.yml @@ -38,7 +38,7 @@ workflows: set -e - sh bin/swift5-all.sh + sh bin/generate-samples.sh bin/configs/swift5-*.yaml - script@1.1.5: title: Run Swift5 tests inputs: diff --git a/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj deleted file mode 100644 index 4893f78082..0000000000 --- a/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - netcoreapp2.0 - - false - - - - - Org.OpenAPITools - - - - - - - - - - - diff --git a/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfo.cs b/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfo.cs deleted file mode 100644 index 0c9ebe0945..0000000000 --- a/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfo.cs +++ /dev/null @@ -1,23 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -using System; -using System.Reflection; - -[assembly: System.Reflection.AssemblyCompanyAttribute("Org.OpenAPITools.Test")] -[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] -[assembly: System.Reflection.AssemblyProductAttribute("Org.OpenAPITools.Test")] -[assembly: System.Reflection.AssemblyTitleAttribute("Org.OpenAPITools.Test")] -[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] - -// Generated by the MSBuild WriteCodeFragment class. - diff --git a/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfoInputs.cache b/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfoInputs.cache deleted file mode 100644 index 217033a3db..0000000000 --- a/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfoInputs.cache +++ /dev/null @@ -1 +0,0 @@ -19e887ae0fddb9fd03c4341951ee9077703a652f diff --git a/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj deleted file mode 100644 index 4893f78082..0000000000 --- a/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - netcoreapp2.0 - - false - - - - - Org.OpenAPITools - - - - - - - - - - - diff --git a/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfo.cs b/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfo.cs deleted file mode 100644 index 0c9ebe0945..0000000000 --- a/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfo.cs +++ /dev/null @@ -1,23 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -using System; -using System.Reflection; - -[assembly: System.Reflection.AssemblyCompanyAttribute("Org.OpenAPITools.Test")] -[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] -[assembly: System.Reflection.AssemblyProductAttribute("Org.OpenAPITools.Test")] -[assembly: System.Reflection.AssemblyTitleAttribute("Org.OpenAPITools.Test")] -[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] - -// Generated by the MSBuild WriteCodeFragment class. - diff --git a/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfoInputs.cache b/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfoInputs.cache deleted file mode 100644 index 217033a3db..0000000000 --- a/CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfoInputs.cache +++ /dev/null @@ -1 +0,0 @@ -19e887ae0fddb9fd03c4341951ee9077703a652f diff --git a/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj deleted file mode 100644 index 9b5a34202c..0000000000 --- a/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ /dev/null @@ -1,92 +0,0 @@ - - - - - Debug - AnyCPU - {19F1DEBC-DE5E-4517-8062-F000CD499087} - Library - Properties - Org.OpenAPITools.Test - Org.OpenAPITools.Test - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - $(SolutionDir)\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - - - $(SolutionDir)\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - - - $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll - - - $(SolutionDir)\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll - ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll - ..\..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll - ..\..\vendor\NUnit.3.11.0\lib\net45\nunit.framework.dll - - - - - - - - - - - - {321C8C3F-0156-40C1-AE42-D59761FB9B6C} - Org.OpenAPITools - - - - - - - diff --git a/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/obj/Debug/Org.OpenAPITools.Test.csprojAssemblyReference.cache b/CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/obj/Debug/Org.OpenAPITools.Test.csprojAssemblyReference.cache deleted file mode 100644 index 2bd5c20b30f36310a7cf2bdaa42d72dacd04ec5e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2076 zcmcIl?M~D{6zzVpAE@|+UnoWWp@B?xv#z2EF}OlZ1Vok)f2@+(?JZ1pI)gK_2*fw> zuaDt7_#(c8-do6Gn(Dtc>FKn4rstkB)4N{I^Ss}9(3OtKJi@1SF)-Td(6Lt|Ap^F} z?a;E0Hn8CDfU!cWrDmHoS%Wne{LV9acCnLsEm z$8&zYUwk=9WfT!E)1X8^az%Rdk9p*>zAN?=hTGv5yj*UICf4vQPayO=FM69s?-?HX ztC)uM9~~_|ecaoE5DcgR_{-Kpgo%UgjYI9NA|JkJGwiXAmF@Gp!zZlW8%Jq?1yYtP zsAIF!*%~P)B4AxGf=hA2Y4u{^DhhwiPM8))D^PA-2O!yN?)b7&8h2N`eaJfH{4u)< zNTQAsE;|Ww6S{d%u*d?WT5p{Mm@D$mB zHd6FsGnY_=XCQL+;ZbnpWeR2XGLRX!0oLj6b8|pqQ*q-%!D`%`uF&Wz!8L;G1k(gJ z2yPPGBDjrEq8an&Fa7&Z;nY#wqUWhS#Utulg-8cQJcoI%iUAzhvZZEjOU507$%o4G z^7(wut5$N - variant.outputs.each { output -> - def outputFile = output.outputFile - if (outputFile != null && outputFile.name.endsWith('.aar')) { - def fileName = "${project.name}-${variant.baseName}-${version}.aar" - output.outputFile = new File(outputFile.parent, fileName) - } - } - } - - dependencies { - provided 'javax.annotation:jsr250-api:1.0' - } - } - - afterEvaluate { - android.libraryVariants.all { variant -> - def task = project.tasks.create "jar${variant.name.capitalize()}", Jar - task.description = "Create jar artifact for ${variant.name}" - task.dependsOn variant.javaCompile - task.from variant.javaCompile.destinationDir - task.destinationDir = project.file("${project.buildDir}/outputs/jar") - task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" - artifacts.add('archives', task); - } - } - - task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - classifier = 'sources' - } - - artifacts { - archives sourcesJar - } - -} else { - - apply plugin: 'java' - apply plugin: 'maven' - sourceCompatibility = JavaVersion.VERSION_1_6 - targetCompatibility = JavaVersion.VERSION_1_6 - - install { - repositories.mavenInstaller { - pom.artifactId = 'petstore-jersey2-java6' - } - } - - task execute(type:JavaExec) { - main = System.getProperty('mainClass') - classpath = sourceSets.main.runtimeClasspath - } -} - -ext { - swagger_annotations_version = "1.5.20" - jackson_version = "2.9.6" - jersey_version = "2.6" - commons_io_version=2.5 - commons_lang3_version=3.6 - junit_version = "4.13" - threetenbp_version = "2.6.4" -} - -dependencies { - compile "io.swagger:swagger-annotations:$swagger_annotations_version" - compile "org.glassfish.jersey.core:jersey-client:$jersey_version" - compile "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version" - compile "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version" - compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" - compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" - compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version" - compile "commons-io:commons-io:$commons_io_version" - compile "org.apache.commons:commons-lang3:$commons_lang3_version" - compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$threetenbp_version" - compile "com.brsanthu:migbase64:2.2" - testCompile "junit:junit:$junit_version" -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/common/ConfigurationTest.java b/CI/samples.ci/client/petstore/java/test-manual/common/ConfigurationTest.java deleted file mode 100644 index f05c230dc7..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/common/ConfigurationTest.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.openapitools.client; - -import org.junit.*; -import static org.junit.Assert.*; - - -public class ConfigurationTest { - @Test - public void testDefaultApiClient() { - ApiClient apiClient = Configuration.getDefaultApiClient(); - assertNotNull(apiClient); - assertEquals("http://petstore.swagger.io:80/v2", apiClient.getBasePath()); - assertFalse(apiClient.isDebugging()); - } -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/common/StringUtilTest.java b/CI/samples.ci/client/petstore/java/test-manual/common/StringUtilTest.java deleted file mode 100644 index aa7c81759e..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/common/StringUtilTest.java +++ /dev/null @@ -1,33 +0,0 @@ -package org.openapitools.client; - -import org.junit.*; -import static org.junit.Assert.*; - - -public class StringUtilTest { - @Test - public void testContainsIgnoreCase() { - assertTrue(StringUtil.containsIgnoreCase(new String[]{"abc"}, "abc")); - assertTrue(StringUtil.containsIgnoreCase(new String[]{"abc"}, "ABC")); - assertTrue(StringUtil.containsIgnoreCase(new String[]{"ABC"}, "abc")); - assertTrue(StringUtil.containsIgnoreCase(new String[]{null, "abc"}, "ABC")); - assertTrue(StringUtil.containsIgnoreCase(new String[]{null, "abc"}, null)); - - assertFalse(StringUtil.containsIgnoreCase(new String[]{"abc"}, "def")); - assertFalse(StringUtil.containsIgnoreCase(new String[]{}, "ABC")); - assertFalse(StringUtil.containsIgnoreCase(new String[]{}, null)); - } - - @Test - public void testJoin() { - String[] array = {"aa", "bb", "cc"}; - assertEquals("aa,bb,cc", StringUtil.join(array, ",")); - assertEquals("aa, bb, cc", StringUtil.join(array, ", ")); - assertEquals("aabbcc", StringUtil.join(array, "")); - assertEquals("aa bb cc", StringUtil.join(array, " ")); - assertEquals("aa\nbb\ncc", StringUtil.join(array, "\n")); - - assertEquals("", StringUtil.join(new String[]{}, ",")); - assertEquals("abc", StringUtil.join(new String[]{"abc"}, ",")); - } -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/jersey1/ApiClientTest.java b/CI/samples.ci/client/petstore/java/test-manual/jersey1/ApiClientTest.java deleted file mode 100644 index 682690f049..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/jersey1/ApiClientTest.java +++ /dev/null @@ -1,291 +0,0 @@ -package org.openapitools.client; - -import org.openapitools.client.auth.*; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.*; - -import org.junit.*; -import static org.junit.Assert.*; - - -public class ApiClientTest { - ApiClient apiClient = null; - - @Before - public void setup() { - apiClient = new ApiClient(); - } - - @Test - public void testParseAndFormatDate() { - // default date format - String dateStr = "2015-11-07T03:49:09.356Z"; - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09.356+00:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09.356Z"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T05:49:09.356+02:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T02:49:09.356-01:00"))); - - // custom date format: without milli-seconds, custom time zone - DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.ROOT); - format.setTimeZone(TimeZone.getTimeZone("GMT+10")); - apiClient.setDateFormat(format); - dateStr = "2015-11-07T13:49:09+10:00"; - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09+00:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09Z"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T00:49:09-03:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T13:49:09+10:00"))); - } - - @Test - public void testIsJsonMime() { - assertFalse(apiClient.isJsonMime(null)); - assertFalse(apiClient.isJsonMime("")); - assertFalse(apiClient.isJsonMime("text/plain")); - assertFalse(apiClient.isJsonMime("application/xml")); - assertFalse(apiClient.isJsonMime("application/jsonp")); - assertFalse(apiClient.isJsonMime("example/json")); - assertFalse(apiClient.isJsonMime("example/foo+bar+jsonx")); - assertFalse(apiClient.isJsonMime("example/foo+bar+xjson")); - - assertTrue(apiClient.isJsonMime("application/json")); - assertTrue(apiClient.isJsonMime("application/json; charset=UTF8")); - assertTrue(apiClient.isJsonMime("APPLICATION/JSON")); - - assertTrue(apiClient.isJsonMime("application/problem+json")); - assertTrue(apiClient.isJsonMime("APPLICATION/PROBLEM+JSON")); - assertTrue(apiClient.isJsonMime("application/json\t")); - assertTrue(apiClient.isJsonMime("example/foo+bar+json")); - assertTrue(apiClient.isJsonMime("example/foo+json;x;y")); - assertTrue(apiClient.isJsonMime("example/foo+json\t;")); - assertTrue(apiClient.isJsonMime("Example/fOO+JSON")); - } - - @Test - public void testSelectHeaderAccept() { - String[] accepts = {"application/json", "application/xml"}; - assertEquals("application/json", apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{"APPLICATION/XML", "APPLICATION/JSON"}; - assertEquals("APPLICATION/JSON", apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{"application/xml", "application/json; charset=UTF8"}; - assertEquals("application/json; charset=UTF8", apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{"text/plain", "application/xml"}; - assertEquals("text/plain,application/xml", apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{}; - assertNull(apiClient.selectHeaderAccept(accepts)); - } - - @Test - public void testSelectHeaderContentType() { - String[] contentTypes = {"application/json", "application/xml"}; - assertEquals("application/json", apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{"APPLICATION/JSON", "APPLICATION/XML"}; - assertEquals("APPLICATION/JSON", apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{"application/xml", "application/json; charset=UTF8"}; - assertEquals("application/json; charset=UTF8", apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{"text/plain", "application/xml"}; - assertEquals("text/plain", apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{}; - assertEquals("application/json", apiClient.selectHeaderContentType(contentTypes)); - } - - @Test - public void testGetAuthentications() { - Map auths = apiClient.getAuthentications(); - - Authentication auth = auths.get("api_key"); - assertNotNull(auth); - assertTrue(auth instanceof ApiKeyAuth); - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) auth; - assertEquals("header", apiKeyAuth.getLocation()); - assertEquals("api_key", apiKeyAuth.getParamName()); - - auth = auths.get("petstore_auth"); - assertTrue(auth instanceof OAuth); - assertSame(auth, apiClient.getAuthentication("petstore_auth")); - - assertNull(auths.get("unknown")); - - try { - auths.put("my_auth", new HttpBasicAuth()); - fail("the authentications returned should not be modifiable"); - } catch (UnsupportedOperationException e) { - } - } - - @Test - public void testSetUsernameAndPassword() { - HttpBasicAuth auth = null; - for (Authentication _auth : apiClient.getAuthentications().values()) { - if (_auth instanceof HttpBasicAuth) { - auth = (HttpBasicAuth) _auth; - break; - } - } - auth.setUsername(null); - auth.setPassword(null); - - apiClient.setUsername("my-username"); - apiClient.setPassword("my-password"); - assertEquals("my-username", auth.getUsername()); - assertEquals("my-password", auth.getPassword()); - - // reset values - auth.setUsername(null); - auth.setPassword(null); - } - - @Test - public void testSetApiKeyAndPrefix() { - ApiKeyAuth auth = null; - for (Authentication _auth : apiClient.getAuthentications().values()) { - if (_auth instanceof ApiKeyAuth) { - auth = (ApiKeyAuth) _auth; - break; - } - } - auth.setApiKey(null); - auth.setApiKeyPrefix(null); - - apiClient.setApiKey("my-api-key"); - apiClient.setApiKeyPrefix("Token"); - assertEquals("my-api-key", auth.getApiKey()); - assertEquals("Token", auth.getApiKeyPrefix()); - - // reset values - auth.setApiKey(null); - auth.setApiKeyPrefix(null); - } - - @Test - public void testParameterToPairWhenNameIsInvalid() throws Exception { - List pairs_a = apiClient.parameterToPair(null, new Integer(1)); - List pairs_b = apiClient.parameterToPair("", new Integer(1)); - - assertTrue(pairs_a.isEmpty()); - assertTrue(pairs_b.isEmpty()); - } - - @Test - public void testParameterToPairWhenValueIsNull() throws Exception { - List pairs = apiClient.parameterToPair("param-a", null); - - assertTrue(pairs.isEmpty()); - } - - @Test - public void testParameterToPairWhenValueIsEmptyString() throws Exception { - // single empty string - List pairs = apiClient.parameterToPair("param-a", " "); - assertEquals(1, pairs.size()); - } - - @Test - public void testParameterToPairWhenValueIsNotCollection() throws Exception { - String name = "param-a"; - Integer value = 1; - - List pairs = apiClient.parameterToPair(name, value); - - assertEquals(1, pairs.size()); - assertEquals(value, Integer.valueOf(pairs.get(0).getValue())); - } - - @Test - public void testParameterToPairWhenValueIsCollection() throws Exception { - List values = new ArrayList(); - values.add("value-a"); - values.add(123); - values.add(new Date()); - - List pairs = apiClient.parameterToPair("param-a", values); - assertEquals(0, pairs.size()); - } - - @Test - public void testParameterToPairsWhenNameIsInvalid() throws Exception { - List objects = new ArrayList(); - objects.add(new Integer(1)); - - List pairs_a = apiClient.parameterToPairs("csv", null, objects); - List pairs_b = apiClient.parameterToPairs("csv", "", objects); - - assertTrue(pairs_a.isEmpty()); - assertTrue(pairs_b.isEmpty()); - } - - @Test - public void testParameterToPairsWhenValueIsNull() throws Exception { - List pairs = apiClient.parameterToPairs("csv", "param-a", null); - - assertTrue(pairs.isEmpty()); - } - - @Test - public void testParameterToPairsWhenValueIsEmptyStrings() throws Exception { - // list of empty strings - List strs = new ArrayList(); - strs.add(" "); - strs.add(" "); - strs.add(" "); - - List concatStrings = apiClient.parameterToPairs("csv", "param-a", strs); - - assertEquals(1, concatStrings.size()); - assertFalse(concatStrings.get(0).getValue().isEmpty()); // should contain some delimiters - } - - @Test - public void testParameterToPairsWhenValueIsCollection() throws Exception { - Map collectionFormatMap = new HashMap(); - collectionFormatMap.put("csv", ","); - collectionFormatMap.put("tsv", "\t"); - collectionFormatMap.put("ssv", " "); - collectionFormatMap.put("pipes", "|"); - collectionFormatMap.put("", ","); // no format, must default to csv - collectionFormatMap.put("unknown", ","); // all other formats, must default to csv - - String name = "param-a"; - - List values = new ArrayList(); - values.add("value-a"); - values.add(123); - values.add(new Date()); - - // check for multi separately - List multiPairs = apiClient.parameterToPairs("multi", name, values); - assertEquals(values.size(), multiPairs.size()); - for (int i = 0; i < values.size(); i++) { - assertEquals(apiClient.escapeString(apiClient.parameterToString(values.get(i))), multiPairs.get(i).getValue()); - } - - // all other formats - for (String collectionFormat : collectionFormatMap.keySet()) { - List pairs = apiClient.parameterToPairs(collectionFormat, name, values); - - assertEquals(1, pairs.size()); - - String delimiter = collectionFormatMap.get(collectionFormat); - if (!delimiter.equals(",")) { - // commas are not escaped because they are reserved characters in URIs - delimiter = apiClient.escapeString(delimiter); - } - String[] pairValueSplit = pairs.get(0).getValue().split(delimiter); - - // must equal input values - assertEquals(values.size(), pairValueSplit.length); - for (int i = 0; i < values.size(); i++) { - assertEquals(apiClient.escapeString(apiClient.parameterToString(values.get(i))), pairValueSplit[i]); - } - } - } -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/jersey1/auth/ApiKeyAuthTest.java b/CI/samples.ci/client/petstore/java/test-manual/jersey1/auth/ApiKeyAuthTest.java deleted file mode 100644 index 02f5da4c22..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/jersey1/auth/ApiKeyAuthTest.java +++ /dev/null @@ -1,71 +0,0 @@ -package org.openapitools.client.auth; - -import java.util.HashMap; -import java.util.ArrayList; -import java.util.Map; -import java.util.List; - -import org.openapitools.client.Pair; -import org.junit.*; -import static org.junit.Assert.*; - - -public class ApiKeyAuthTest { - @Test - public void testApplyToParamsInQuery() { - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map cookieParams = new HashMap(); - - ApiKeyAuth auth = new ApiKeyAuth("query", "api_key"); - auth.setApiKey("my-api-key"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - assertEquals(1, queryParams.size()); - for (Pair queryParam : queryParams) { - assertEquals("my-api-key", queryParam.getValue()); - } - - // no changes to header or cookie parameters - assertEquals(0, headerParams.size()); - assertEquals(0, cookieParams.size()); - } - - @Test - public void testApplyToParamsInHeaderWithPrefix() { - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map cookieParams = new HashMap(); - - ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN"); - auth.setApiKey("my-api-token"); - auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - // no changes to query or cookie parameters - assertEquals(0, queryParams.size()); - assertEquals(0, cookieParams.size()); - - assertEquals(1, headerParams.size()); - assertEquals("Token my-api-token", headerParams.get("X-API-TOKEN")); - } - - @Test - public void testApplyToParamsInCookieWithPrefix() { - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map cookieParams = new HashMap(); - - ApiKeyAuth auth = new ApiKeyAuth("cookie", "X-API-TOKEN"); - auth.setApiKey("my-api-token"); - auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - // no changes to query or header parameters - assertEquals(0, queryParams.size()); - assertEquals(0, headerParams.size()); - - assertEquals(1, cookieParams.size()); - assertEquals("Token my-api-token", cookieParams.get("X-API-TOKEN")); - } -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/jersey1/auth/HttpBasicAuthTest.java b/CI/samples.ci/client/petstore/java/test-manual/jersey1/auth/HttpBasicAuthTest.java deleted file mode 100644 index 458e73e8a7..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/jersey1/auth/HttpBasicAuthTest.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.openapitools.client.auth; - -import java.util.HashMap; -import java.util.ArrayList; -import java.util.Map; -import java.util.List; - -import org.openapitools.client.Pair; -import org.junit.*; -import static org.junit.Assert.*; - - -public class HttpBasicAuthTest { - HttpBasicAuth auth = null; - - @Before - public void setup() { - auth = new HttpBasicAuth(); - } - - @Test - public void testApplyToParams() { - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map cookieParams = new HashMap(); - - auth.setUsername("my-username"); - auth.setPassword("my-password"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - // no changes to query or cookie parameters - assertEquals(0, queryParams.size()); - assertEquals(0, cookieParams.size()); - assertEquals(1, headerParams.size()); - // the string below is base64-encoded result of "my-username:my-password" with the "Basic " prefix - String expected = "Basic bXktdXNlcm5hbWU6bXktcGFzc3dvcmQ="; - assertEquals(expected, headerParams.get("Authorization")); - - // null username should be treated as empty string - auth.setUsername(null); - auth.applyToParams(queryParams, headerParams, cookieParams); - // the string below is base64-encoded result of ":my-password" with the "Basic " prefix - expected = "Basic Om15LXBhc3N3b3Jk"; - assertEquals(expected, headerParams.get("Authorization")); - - // null password should be treated as empty string - auth.setUsername("my-username"); - auth.setPassword(null); - auth.applyToParams(queryParams, headerParams, cookieParams); - // the string below is base64-encoded result of "my-username:" with the "Basic " prefix - expected = "Basic bXktdXNlcm5hbWU6"; - assertEquals(expected, headerParams.get("Authorization")); - } -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/jersey1/model/EnumValueTest.java b/CI/samples.ci/client/petstore/java/test-manual/jersey1/model/EnumValueTest.java deleted file mode 100644 index 47bfe940d3..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/jersey1/model/EnumValueTest.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.openapitools.client.model; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.ObjectWriter; -import com.fasterxml.jackson.databind.SerializationFeature; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -public class EnumValueTest { - - @Test - public void testEnumClass() { - assertEquals(EnumClass._ABC.toString(), "_abc"); - assertEquals(EnumClass._EFG.toString(), "-efg"); - assertEquals(EnumClass._XYZ_.toString(), "(xyz)"); - } - - @Test - public void testEnumTest() { - // test enum value - EnumTest enumTest = new EnumTest(); - enumTest.setEnumString(EnumTest.EnumStringEnum.LOWER); - enumTest.setEnumInteger(EnumTest.EnumIntegerEnum.NUMBER_1); - enumTest.setEnumNumber(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1); - - assertEquals(EnumTest.EnumStringEnum.UPPER.toString(), "UPPER"); - assertEquals(EnumTest.EnumStringEnum.UPPER.getValue(), "UPPER"); - assertEquals(EnumTest.EnumStringEnum.LOWER.toString(), "lower"); - assertEquals(EnumTest.EnumStringEnum.LOWER.getValue(), "lower"); - - assertEquals(EnumTest.EnumIntegerEnum.NUMBER_1.toString(), "1"); - assertTrue(EnumTest.EnumIntegerEnum.NUMBER_1.getValue() == 1); - assertEquals(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.toString(), "-1"); - assertTrue(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.getValue() == -1); - - assertEquals(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.toString(), "1.1"); - assertTrue(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.getValue() == 1.1); - assertEquals(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.toString(), "-1.2"); - assertTrue(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.getValue() == -1.2); - - try { - // test serialization (object => json) - ObjectMapper mapper = new ObjectMapper(); - mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); - ObjectWriter ow = mapper.writer(); - String json = ow.writeValueAsString(enumTest); - assertEquals(json, "{\"enum_string\":\"lower\",\"enum_string_required\":null,\"enum_integer\":1,\"enum_number\":1.1,\"outerEnum\":null}"); - - // test deserialization (json => object) - EnumTest fromString = mapper.readValue(json, EnumTest.class); - assertEquals(fromString.getEnumString().toString(), "lower"); - assertEquals(fromString.getEnumInteger().toString(), "1"); - assertEquals(fromString.getEnumNumber().toString(), "1.1"); - - } catch (Exception e) { - fail("Exception thrown during serialization/deserialzation of JSON: " + e.getMessage()); - } - } -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/jersey2-java8/JSONComposedSchemaTest.java b/CI/samples.ci/client/petstore/java/test-manual/jersey2-java8/JSONComposedSchemaTest.java deleted file mode 100644 index 89227f3d25..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/jersey2-java8/JSONComposedSchemaTest.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.openapitools.client; - -import org.openapitools.client.model.Mammal; -import org.openapitools.client.model.AppleReq; -import org.openapitools.client.model.BananaReq; -import org.openapitools.client.model.FruitReq; -import org.openapitools.client.model.BasquePig; -import org.openapitools.client.model.Pig; -import org.openapitools.client.model.Whale; -import org.openapitools.client.model.Zebra; -import java.lang.Exception; - -import org.junit.*; -import static org.junit.Assert.*; - - -public class JSONComposedSchemaTest { - JSON json = null; - Mammal mammal = null; - - @Before - public void setup() { - json = new JSON(); - mammal = new Mammal(); - } - - /** - * Validate a oneOf schema can be deserialized into the expected class. - * The oneOf schema does not have a discriminator. - */ - @Test - public void testOneOfSchemaWithoutDiscriminator() throws Exception { - // BananaReq and AppleReq have explicitly defined properties that are different by name. - // There is no discriminator property. - String str = "{ \"cultivar\": \"golden delicious\", \"mealy\": false }"; - FruitReq o = json.getContext(null).readValue(str, FruitReq.class); - assertTrue(o.getActualInstance() instanceof AppleReq); - } - - /** - * Validate a oneOf schema can be deserialized into the expected class. - * The oneOf schema has a discriminator. - */ - @Test - public void testOneOfSchemaWithDiscriminator() throws Exception { - // Mammal can be one of whale, pig and zebra. - // pig has sub-classes. - String str = "{ \"className\": \"whale\", \"hasBaleen\": true, \"hasTeeth\": false }"; - /* - DISABLING unit test for now until ambiguity of discriminator is resolved. - - // Note that the 'zebra' schema does not have any explicit property defined AND - // it has additionalProperties: true. Hence without a discriminator the above - // JSON payload would match both 'whale' and 'zebra'. This is because the 'hasBaleen' - // and 'hasTeeth' would be considered additional (undeclared) properties for 'zebra'. - Mammal o = json.getContext(null).readValue(str, Mammal.class); - assertTrue(o.getActualInstance() instanceof Whale); - - str = "{ \"className\": \"zebra\" }"; - o = json.getContext(null).readValue(str, Mammal.class); - assertTrue(o.getActualInstance() instanceof Zebra); - - str = "{ \"className\": \"BasquePig\" }"; - o = json.getContext(null).readValue(str, Mammal.class); - assertTrue(o.getActualInstance() instanceof BasquePig); - */ - } -} \ No newline at end of file diff --git a/CI/samples.ci/client/petstore/java/test-manual/jersey2-java8/JSONTest.java b/CI/samples.ci/client/petstore/java/test-manual/jersey2-java8/JSONTest.java deleted file mode 100644 index 7fb307a3df..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/jersey2-java8/JSONTest.java +++ /dev/null @@ -1,45 +0,0 @@ -package org.openapitools.client; - -import org.openapitools.client.model.Order; - -import java.lang.Exception; - -import java.time.OffsetDateTime; -import java.time.ZoneId; -import java.time.format.DateTimeFormatter; -import org.junit.*; -import static org.junit.Assert.*; - - -public class JSONTest { - JSON json = null; - Order order = null; - - @Before - public void setup() { - json = new JSON(); - order = new Order(); - } - - @Test - public void testDefaultDate() throws Exception { - final DateTimeFormatter dateFormat = DateTimeFormatter.ISO_OFFSET_DATE_TIME; - final String dateStr = "2015-11-07T14:11:05.267Z"; - order.setShipDate(dateFormat.parse(dateStr, OffsetDateTime::from)); - - String str = json.getContext(null).writeValueAsString(order); - Order o = json.getContext(null).readValue(str, Order.class); - assertEquals(dateStr, dateFormat.format(o.getShipDate())); - } - - @Test - public void testCustomDate() throws Exception { - final DateTimeFormatter dateFormat = DateTimeFormatter.ISO_OFFSET_DATE_TIME.withZone(ZoneId.of("Etc/GMT+2")); - final String dateStr = "2015-11-07T14:11:05-02:00"; - order.setShipDate(dateFormat.parse(dateStr, OffsetDateTime::from)); - - String str = json.getContext(null).writeValueAsString(order); - Order o = json.getContext(null).readValue(str, Order.class); - assertEquals(dateStr, dateFormat.format(o.getShipDate())); - } -} \ No newline at end of file diff --git a/CI/samples.ci/client/petstore/java/test-manual/jersey2/ApiClientTest.java b/CI/samples.ci/client/petstore/java/test-manual/jersey2/ApiClientTest.java deleted file mode 100644 index 1fcc0bca7f..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/jersey2/ApiClientTest.java +++ /dev/null @@ -1,249 +0,0 @@ -package org.openapitools.client; - -import org.openapitools.client.auth.*; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.*; - -import org.junit.*; -import static org.junit.Assert.*; - - -public class ApiClientTest { - ApiClient apiClient = null; - - @Before - public void setup() { - apiClient = new ApiClient(); - } - - @Test - public void testParseAndFormatDate() { - // default date format - String dateStr = "2015-11-07T03:49:09.356Z"; - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09.356+00:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09.356Z"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T05:49:09.356+02:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T02:49:09.356-01:00"))); - - // custom date format: without milli-seconds, custom time zone - DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.ROOT); - format.setTimeZone(TimeZone.getTimeZone("GMT+10")); - apiClient.setDateFormat(format); - dateStr = "2015-11-07T13:49:09+10:00"; - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09+00:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09Z"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T00:49:09-03:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T13:49:09+10:00"))); - } - - @Test - public void testIsJsonMime() { - assertFalse(apiClient.isJsonMime(null)); - assertFalse(apiClient.isJsonMime("")); - assertFalse(apiClient.isJsonMime("text/plain")); - assertFalse(apiClient.isJsonMime("application/xml")); - assertFalse(apiClient.isJsonMime("application/jsonp")); - assertFalse(apiClient.isJsonMime("example/json")); - assertFalse(apiClient.isJsonMime("example/foo+bar+jsonx")); - assertFalse(apiClient.isJsonMime("example/foo+bar+xjson")); - - assertTrue(apiClient.isJsonMime("application/json")); - assertTrue(apiClient.isJsonMime("application/json; charset=UTF8")); - assertTrue(apiClient.isJsonMime("APPLICATION/JSON")); - - assertTrue(apiClient.isJsonMime("application/problem+json")); - assertTrue(apiClient.isJsonMime("APPLICATION/PROBLEM+JSON")); - assertTrue(apiClient.isJsonMime("application/json\t")); - assertTrue(apiClient.isJsonMime("example/foo+bar+json")); - assertTrue(apiClient.isJsonMime("example/foo+json;x;y")); - assertTrue(apiClient.isJsonMime("example/foo+json\t;")); - assertTrue(apiClient.isJsonMime("Example/fOO+JSON")); - } - - @Test - public void testSelectHeaderAccept() { - String[] accepts = {"application/json", "application/xml"}; - assertEquals("application/json", apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{"APPLICATION/XML", "APPLICATION/JSON"}; - assertEquals("APPLICATION/JSON", apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{"application/xml", "application/json; charset=UTF8"}; - assertEquals("application/json; charset=UTF8", apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{"text/plain", "application/xml"}; - assertEquals("text/plain,application/xml", apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{}; - assertNull(apiClient.selectHeaderAccept(accepts)); - } - - @Test - public void testSelectHeaderContentType() { - String[] contentTypes = {"application/json", "application/xml"}; - assertEquals("application/json", apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{"APPLICATION/JSON", "APPLICATION/XML"}; - assertEquals("APPLICATION/JSON", apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{"application/xml", "application/json; charset=UTF8"}; - assertEquals("application/json; charset=UTF8", apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{"text/plain", "application/xml"}; - assertEquals("text/plain", apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{}; - assertEquals("application/json", apiClient.selectHeaderContentType(contentTypes)); - } - - @Test - public void testGetAuthentications() { - Map auths = apiClient.getAuthentications(); - - Authentication auth = auths.get("api_key"); - assertNotNull(auth); - assertTrue(auth instanceof ApiKeyAuth); - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) auth; - assertEquals("header", apiKeyAuth.getLocation()); - assertEquals("api_key", apiKeyAuth.getParamName()); - - auth = auths.get("petstore_auth"); - assertTrue(auth instanceof OAuth); - assertSame(auth, apiClient.getAuthentication("petstore_auth")); - - assertNull(auths.get("unknown")); - - try { - auths.put("my_auth", new HttpBasicAuth()); - fail("the authentications returned should not be modifiable"); - } catch (UnsupportedOperationException e) { - } - } - - @Test - public void testSetUsernameAndPassword() { - HttpBasicAuth auth = null; - for (Authentication _auth : apiClient.getAuthentications().values()) { - if (_auth instanceof HttpBasicAuth) { - auth = (HttpBasicAuth) _auth; - break; - } - } - auth.setUsername(null); - auth.setPassword(null); - - apiClient.setUsername("my-username"); - apiClient.setPassword("my-password"); - assertEquals("my-username", auth.getUsername()); - assertEquals("my-password", auth.getPassword()); - - // reset values - auth.setUsername(null); - auth.setPassword(null); - } - - @Test - public void testSetApiKeyAndPrefix() { - ApiKeyAuth auth = null; - for (Authentication _auth : apiClient.getAuthentications().values()) { - if (_auth instanceof ApiKeyAuth) { - auth = (ApiKeyAuth) _auth; - break; - } - } - auth.setApiKey(null); - auth.setApiKeyPrefix(null); - - apiClient.setApiKey("my-api-key"); - apiClient.setApiKeyPrefix("Token"); - assertEquals("my-api-key", auth.getApiKey()); - assertEquals("Token", auth.getApiKeyPrefix()); - - // reset values - auth.setApiKey(null); - auth.setApiKeyPrefix(null); - } - - @Test - public void testParameterToPairsWhenNameIsInvalid() throws Exception { - List pairs_a = apiClient.parameterToPairs("csv", null, new Integer(1)); - List pairs_b = apiClient.parameterToPairs("csv", "", new Integer(1)); - - assertTrue(pairs_a.isEmpty()); - assertTrue(pairs_b.isEmpty()); - } - - @Test - public void testParameterToPairsWhenValueIsNull() throws Exception { - List pairs = apiClient.parameterToPairs("csv", "param-a", null); - - assertTrue(pairs.isEmpty()); - } - - @Test - public void testParameterToPairsWhenValueIsEmptyStrings() throws Exception { - - // single empty string - List pairs = apiClient.parameterToPairs("csv", "param-a", " "); - assertEquals(1, pairs.size()); - - // list of empty strings - List strs = new ArrayList(); - strs.add(" "); - strs.add(" "); - strs.add(" "); - - List concatStrings = apiClient.parameterToPairs("csv", "param-a", strs); - - assertEquals(1, concatStrings.size()); - assertFalse(concatStrings.get(0).getValue().isEmpty()); // should contain some delimiters - } - - @Test - public void testParameterToPairsWhenValueIsNotCollection() throws Exception { - String name = "param-a"; - Integer value = 1; - - List pairs = apiClient.parameterToPairs("csv", name, value); - - assertEquals(1, pairs.size()); - assertEquals(value, Integer.valueOf(pairs.get(0).getValue())); - } - - @Test - public void testParameterToPairsWhenValueIsCollection() throws Exception { - Map collectionFormatMap = new HashMap(); - collectionFormatMap.put("csv", ","); - collectionFormatMap.put("tsv", "\t"); - collectionFormatMap.put("ssv", " "); - collectionFormatMap.put("pipes", "\\|"); - collectionFormatMap.put("", ","); // no format, must default to csv - collectionFormatMap.put("unknown", ","); // all other formats, must default to csv - - String name = "param-a"; - - List values = new ArrayList(); - values.add("value-a"); - values.add(123); - values.add(new Date()); - - // check for multi separately - List multiPairs = apiClient.parameterToPairs("multi", name, values); - assertEquals(values.size(), multiPairs.size()); - - // all other formats - for (String collectionFormat : collectionFormatMap.keySet()) { - List pairs = apiClient.parameterToPairs(collectionFormat, name, values); - - assertEquals(1, pairs.size()); - - String delimiter = collectionFormatMap.get(collectionFormat); - String[] pairValueSplit = pairs.get(0).getValue().split(delimiter); - - // must equal input values - assertEquals(values.size(), pairValueSplit.length); - } - } -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/jersey2/JSONTest.java b/CI/samples.ci/client/petstore/java/test-manual/jersey2/JSONTest.java deleted file mode 100644 index f21b852065..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/jersey2/JSONTest.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.openapitools.client; - -import org.openapitools.client.model.Order; -import org.junit.Before; -import org.junit.Test; -import org.threeten.bp.OffsetDateTime; -import org.threeten.bp.ZoneId; -import org.threeten.bp.format.DateTimeFormatter; - -import static org.junit.Assert.*; - - -public class JSONTest { - private JSON json = null; - private Order order = null; - - @Before - public void setup() { - json = new ApiClient().getJSON(); - order = new Order(); - } - - @Test - public void testDefaultDate() throws Exception { - final DateTimeFormatter dateFormat = DateTimeFormatter.ISO_OFFSET_DATE_TIME; - final String dateStr = "2015-11-07T14:11:05.267Z"; - order.setShipDate(dateFormat.parse(dateStr, OffsetDateTime.FROM)); - - String str = json.getContext(null).writeValueAsString(order); - Order o = json.getContext(null).readValue(str, Order.class); - assertEquals(dateStr, dateFormat.format(o.getShipDate())); - } - - @Test - public void testCustomDate() throws Exception { - final DateTimeFormatter dateFormat = DateTimeFormatter.ISO_OFFSET_DATE_TIME.withZone(ZoneId.of("Etc/GMT+2")); - final String dateStr = "2015-11-07T14:11:05-02:00"; - order.setShipDate(dateFormat.parse(dateStr, OffsetDateTime.FROM)); - - String str = json.getContext(null).writeValueAsString(order); - Order o = json.getContext(null).readValue(str, Order.class); - assertEquals(dateStr, dateFormat.format(o.getShipDate())); - } - - @Test - public void testSqlDateSerialization() throws Exception { - String str = json.getContext(null).writeValueAsString(new java.sql.Date(10)); - assertEquals("\"1970-01-01\"", str); - } - - @Test - public void testSqlDateDeserialization() throws Exception { - final String str = "1970-01-01"; - java.sql.Date date = json.getContext(null).readValue("\"" + str + "\"", java.sql.Date.class); - assertEquals(date.toString(), str); - } - -} \ No newline at end of file diff --git a/CI/samples.ci/client/petstore/java/test-manual/jersey2/auth/ApiKeyAuthTest.java b/CI/samples.ci/client/petstore/java/test-manual/jersey2/auth/ApiKeyAuthTest.java deleted file mode 100644 index 3e33515209..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/jersey2/auth/ApiKeyAuthTest.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.openapitools.client.auth; - -import java.util.HashMap; -import java.util.ArrayList; -import java.util.Map; -import java.util.List; - -import org.openapitools.client.ApiException; -import org.openapitools.client.Pair; -import org.junit.*; -import static org.junit.Assert.*; - - -public class ApiKeyAuthTest { - @Test - public void testApplyToParamsInQuery() throws ApiException { - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map cookieParams = new HashMap(); - - ApiKeyAuth auth = new ApiKeyAuth("query", "api_key"); - auth.setApiKey("my-api-key"); - auth.applyToParams(queryParams, headerParams, cookieParams, null, null, null); - - assertEquals(1, queryParams.size()); - for (Pair queryParam : queryParams) { - assertEquals("my-api-key", queryParam.getValue()); - } - - // no changes to header or cookie parameters - assertEquals(0, headerParams.size()); - assertEquals(0, cookieParams.size()); - } - - @Test - public void testApplyToParamsInHeaderWithPrefix() throws ApiException { - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map cookieParams = new HashMap(); - - ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN"); - auth.setApiKey("my-api-token"); - auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams, cookieParams, null, null, null); - - // no changes to query parameters - assertEquals(0, queryParams.size()); - assertEquals(0, cookieParams.size()); - assertEquals(1, headerParams.size()); - assertEquals("Token my-api-token", headerParams.get("X-API-TOKEN")); - } - - @Test - public void testApplyToParamsInCookieWithPrefix() throws ApiException { - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map cookieParams = new HashMap(); - - ApiKeyAuth auth = new ApiKeyAuth("cookie", "X-API-TOKEN"); - auth.setApiKey("my-api-token"); - auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams, cookieParams, null, null, null); - - // no changes to query or header parameters - assertEquals(0, queryParams.size()); - assertEquals(0, headerParams.size()); - assertEquals(1, cookieParams.size()); - assertEquals("Token my-api-token", cookieParams.get("X-API-TOKEN")); - } -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/jersey2/auth/HttpBasicAuthTest.java b/CI/samples.ci/client/petstore/java/test-manual/jersey2/auth/HttpBasicAuthTest.java deleted file mode 100644 index 88b2105e24..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/jersey2/auth/HttpBasicAuthTest.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.openapitools.client.auth; - -import java.util.HashMap; -import java.util.ArrayList; -import java.util.Map; -import java.util.List; - -import org.openapitools.client.ApiException; -import org.openapitools.client.Pair; -import org.junit.*; -import static org.junit.Assert.*; - - -public class HttpBasicAuthTest { - HttpBasicAuth auth = null; - - @Before - public void setup() { - auth = new HttpBasicAuth(); - } - - @Test - public void testApplyToParams() throws ApiException { - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map cookieParams = new HashMap(); - - auth.setUsername("my-username"); - auth.setPassword("my-password"); - auth.applyToParams(queryParams, headerParams, cookieParams, null, null, null); - - // no changes to query parameters - assertEquals(0, queryParams.size()); - assertEquals(1, headerParams.size()); - // the string below is base64-encoded result of "my-username:my-password" with the "Basic " prefix - String expected = "Basic bXktdXNlcm5hbWU6bXktcGFzc3dvcmQ="; - assertEquals(expected, headerParams.get("Authorization")); - - // null username should be treated as empty string - auth.setUsername(null); - auth.applyToParams(queryParams, headerParams, cookieParams, null, null, null); - // the string below is base64-encoded result of ":my-password" with the "Basic " prefix - expected = "Basic Om15LXBhc3N3b3Jk"; - assertEquals(expected, headerParams.get("Authorization")); - - // null password should be treated as empty string - auth.setUsername("my-username"); - auth.setPassword(null); - auth.applyToParams(queryParams, headerParams, cookieParams, null, null, null); - // the string below is base64-encoded result of "my-username:" with the "Basic " prefix - expected = "Basic bXktdXNlcm5hbWU6"; - assertEquals(expected, headerParams.get("Authorization")); - } -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/jersey2/model/EnumValueTest.java b/CI/samples.ci/client/petstore/java/test-manual/jersey2/model/EnumValueTest.java deleted file mode 100644 index 47bfe940d3..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/jersey2/model/EnumValueTest.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.openapitools.client.model; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.ObjectWriter; -import com.fasterxml.jackson.databind.SerializationFeature; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -public class EnumValueTest { - - @Test - public void testEnumClass() { - assertEquals(EnumClass._ABC.toString(), "_abc"); - assertEquals(EnumClass._EFG.toString(), "-efg"); - assertEquals(EnumClass._XYZ_.toString(), "(xyz)"); - } - - @Test - public void testEnumTest() { - // test enum value - EnumTest enumTest = new EnumTest(); - enumTest.setEnumString(EnumTest.EnumStringEnum.LOWER); - enumTest.setEnumInteger(EnumTest.EnumIntegerEnum.NUMBER_1); - enumTest.setEnumNumber(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1); - - assertEquals(EnumTest.EnumStringEnum.UPPER.toString(), "UPPER"); - assertEquals(EnumTest.EnumStringEnum.UPPER.getValue(), "UPPER"); - assertEquals(EnumTest.EnumStringEnum.LOWER.toString(), "lower"); - assertEquals(EnumTest.EnumStringEnum.LOWER.getValue(), "lower"); - - assertEquals(EnumTest.EnumIntegerEnum.NUMBER_1.toString(), "1"); - assertTrue(EnumTest.EnumIntegerEnum.NUMBER_1.getValue() == 1); - assertEquals(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.toString(), "-1"); - assertTrue(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.getValue() == -1); - - assertEquals(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.toString(), "1.1"); - assertTrue(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.getValue() == 1.1); - assertEquals(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.toString(), "-1.2"); - assertTrue(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.getValue() == -1.2); - - try { - // test serialization (object => json) - ObjectMapper mapper = new ObjectMapper(); - mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); - ObjectWriter ow = mapper.writer(); - String json = ow.writeValueAsString(enumTest); - assertEquals(json, "{\"enum_string\":\"lower\",\"enum_string_required\":null,\"enum_integer\":1,\"enum_number\":1.1,\"outerEnum\":null}"); - - // test deserialization (json => object) - EnumTest fromString = mapper.readValue(json, EnumTest.class); - assertEquals(fromString.getEnumString().toString(), "lower"); - assertEquals(fromString.getEnumInteger().toString(), "1"); - assertEquals(fromString.getEnumNumber().toString(), "1.1"); - - } catch (Exception e) { - fail("Exception thrown during serialization/deserialzation of JSON: " + e.getMessage()); - } - } -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/ApiClientTest.java b/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/ApiClientTest.java deleted file mode 100644 index 626901593b..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/ApiClientTest.java +++ /dev/null @@ -1,347 +0,0 @@ -package org.openapitools.client; - -import okhttp3.OkHttpClient; -import org.openapitools.client.auth.*; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.*; -import java.util.TimeZone; - -import org.junit.*; -import static org.junit.Assert.*; -import static org.hamcrest.CoreMatchers.*; - - -public class ApiClientTest { - ApiClient apiClient; - JSON json; - - @Before - public void setup() { - apiClient = new ApiClient(); - json = apiClient.getJSON(); - } - - @Test - public void testIsJsonMime() { - assertFalse(apiClient.isJsonMime(null)); - assertFalse(apiClient.isJsonMime("")); - assertFalse(apiClient.isJsonMime("text/plain")); - assertFalse(apiClient.isJsonMime("application/xml")); - assertFalse(apiClient.isJsonMime("application/jsonp")); - assertFalse(apiClient.isJsonMime("example/json")); - assertFalse(apiClient.isJsonMime("example/foo+bar+jsonx")); - assertFalse(apiClient.isJsonMime("example/foo+bar+xjson")); - - assertTrue(apiClient.isJsonMime("application/json")); - assertTrue(apiClient.isJsonMime("application/json; charset=UTF8")); - assertTrue(apiClient.isJsonMime("APPLICATION/JSON")); - - assertTrue(apiClient.isJsonMime("application/problem+json")); - assertTrue(apiClient.isJsonMime("APPLICATION/PROBLEM+JSON")); - assertTrue(apiClient.isJsonMime("application/json\t")); - assertTrue(apiClient.isJsonMime("example/foo+bar+json")); - assertTrue(apiClient.isJsonMime("example/foo+json;x;y")); - assertTrue(apiClient.isJsonMime("example/foo+json\t;")); - assertTrue(apiClient.isJsonMime("Example/fOO+JSON")); - - assertTrue(apiClient.isJsonMime("application/json-patch+json")); - } - - @Test - public void testSelectHeaderAccept() { - String[] accepts = {"application/json", "application/xml"}; - assertEquals("application/json", apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{"APPLICATION/XML", "APPLICATION/JSON"}; - assertEquals("APPLICATION/JSON", apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{"application/xml", "application/json; charset=UTF8"}; - assertEquals("application/json; charset=UTF8", apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{"text/plain", "application/xml"}; - assertEquals("text/plain,application/xml", apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{}; - assertNull(apiClient.selectHeaderAccept(accepts)); - } - - @Test - public void testSelectHeaderContentType() { - String[] contentTypes = {"application/json", "application/xml"}; - assertEquals("application/json", apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{"APPLICATION/JSON", "APPLICATION/XML"}; - assertEquals("APPLICATION/JSON", apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{"application/xml", "application/json; charset=UTF8"}; - assertEquals("application/json; charset=UTF8", apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{"text/plain", "application/xml"}; - assertEquals("text/plain", apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{}; - assertEquals("application/json", apiClient.selectHeaderContentType(contentTypes)); - } - - @Test - public void testGetAuthentications() { - Map auths = apiClient.getAuthentications(); - - Authentication auth = auths.get("api_key"); - assertNotNull(auth); - assertTrue(auth instanceof ApiKeyAuth); - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) auth; - assertEquals("header", apiKeyAuth.getLocation()); - assertEquals("api_key", apiKeyAuth.getParamName()); - - auth = auths.get("petstore_auth"); - assertTrue(auth instanceof OAuth); - assertSame(auth, apiClient.getAuthentication("petstore_auth")); - - assertNull(auths.get("unknown")); - - try { - auths.put("my_auth", new HttpBasicAuth()); - fail("the authentications returned should not be modifiable"); - } catch (UnsupportedOperationException e) { - } - } - - /* - @Test - public void testSetUsernameAndPassword() { - HttpBasicAuth auth = null; - for (Authentication _auth : apiClient.getAuthentications().values()) { - if (_auth instanceof HttpBasicAuth) { - auth = (HttpBasicAuth) _auth; - break; - } - } - auth.setUsername(null); - auth.setPassword(null); - - apiClient.setUsername("my-username"); - apiClient.setPassword("my-password"); - assertEquals("my-username", auth.getUsername()); - assertEquals("my-password", auth.getPassword()); - - // reset values - auth.setUsername(null); - auth.setPassword(null); - } - */ - - @Test - public void testSetApiKeyAndPrefix() { - ApiKeyAuth auth = null; - for (Authentication _auth : apiClient.getAuthentications().values()) { - if (_auth instanceof ApiKeyAuth) { - auth = (ApiKeyAuth) _auth; - break; - } - } - auth.setApiKey(null); - auth.setApiKeyPrefix(null); - - apiClient.setApiKey("my-api-key"); - apiClient.setApiKeyPrefix("Token"); - assertEquals("my-api-key", auth.getApiKey()); - assertEquals("Token", auth.getApiKeyPrefix()); - - // reset values - auth.setApiKey(null); - auth.setApiKeyPrefix(null); - } - - @Test - public void testGetAndSetConnectTimeout() { - // connect timeout defaults to 10 seconds - assertEquals(10000, apiClient.getConnectTimeout()); - assertEquals(10000, apiClient.getHttpClient().connectTimeoutMillis()); - - apiClient.setConnectTimeout(0); - assertEquals(0, apiClient.getConnectTimeout()); - assertEquals(0, apiClient.getHttpClient().connectTimeoutMillis()); - - apiClient.setConnectTimeout(10000); - } - - @Test - public void testGetAndSetReadTimeout() { - // read timeout defaults to 10 seconds - assertEquals(10000, apiClient.getReadTimeout()); - assertEquals(10000, apiClient.getHttpClient().readTimeoutMillis()); - - apiClient.setReadTimeout(0); - assertEquals(0, apiClient.getReadTimeout()); - assertEquals(0, apiClient.getHttpClient().readTimeoutMillis()); - - apiClient.setReadTimeout(10000); - } - - @Test - public void testGetAndSetWriteTimeout() { - // write timeout defaults to 10 seconds - assertEquals(10000, apiClient.getWriteTimeout()); - assertEquals(10000, apiClient.getHttpClient().writeTimeoutMillis()); - - apiClient.setWriteTimeout(0); - assertEquals(0, apiClient.getWriteTimeout()); - assertEquals(0, apiClient.getHttpClient().writeTimeoutMillis()); - - apiClient.setWriteTimeout(10000); - } - - @Test - public void testParameterToPairWhenNameIsInvalid() throws Exception { - List pairs_a = apiClient.parameterToPair(null, new Integer(1)); - List pairs_b = apiClient.parameterToPair("", new Integer(1)); - - assertTrue(pairs_a.isEmpty()); - assertTrue(pairs_b.isEmpty()); - } - - @Test - public void testParameterToPairWhenValueIsNull() throws Exception { - List pairs = apiClient.parameterToPair("param-a", null); - - assertTrue(pairs.isEmpty()); - } - - @Test - public void testParameterToPairWhenValueIsEmptyString() throws Exception { - // single empty string - List pairs = apiClient.parameterToPair("param-a", " "); - assertEquals(1, pairs.size()); - } - - @Test - public void testParameterToPairWhenValueIsNotCollection() throws Exception { - String name = "param-a"; - Integer value = 1; - - List pairs = apiClient.parameterToPair(name, value); - - assertEquals(1, pairs.size()); - assertEquals(value, Integer.valueOf(pairs.get(0).getValue())); - } - - @Test - public void testParameterToPairWhenValueIsCollection() throws Exception { - List values = new ArrayList(); - values.add("value-a"); - values.add(123); - values.add(new Date()); - - List pairs = apiClient.parameterToPair("param-a", values); - assertEquals(0, pairs.size()); - } - - @Test - public void testParameterToPairsWhenNameIsInvalid() throws Exception { - List objects = new ArrayList(); - objects.add(new Integer(1)); - - List pairs_a = apiClient.parameterToPairs("csv", null, objects); - List pairs_b = apiClient.parameterToPairs("csv", "", objects); - - assertTrue(pairs_a.isEmpty()); - assertTrue(pairs_b.isEmpty()); - } - - @Test - public void testParameterToPairsWhenValueIsNull() throws Exception { - List pairs = apiClient.parameterToPairs("csv", "param-a", null); - - assertTrue(pairs.isEmpty()); - } - - @Test - public void testParameterToPairsWhenValueIsEmptyStrings() throws Exception { - // list of empty strings - List strs = new ArrayList(); - strs.add(" "); - strs.add(" "); - strs.add(" "); - - List concatStrings = apiClient.parameterToPairs("csv", "param-a", strs); - - assertEquals(1, concatStrings.size()); - assertFalse(concatStrings.get(0).getValue().isEmpty()); // should contain some delimiters - } - - @Test - public void testParameterToPairsWhenValueIsCollection() throws Exception { - Map collectionFormatMap = new HashMap(); - collectionFormatMap.put("csv", ","); - collectionFormatMap.put("tsv", "\t"); - collectionFormatMap.put("ssv", " "); - collectionFormatMap.put("pipes", "|"); - collectionFormatMap.put("", ","); // no format, must default to csv - collectionFormatMap.put("unknown", ","); // all other formats, must default to csv - - String name = "param-a"; - - List values = new ArrayList(); - values.add("value-a"); - values.add(123); - values.add(new Date()); - - // check for multi separately - List multiPairs = apiClient.parameterToPairs("multi", name, values); - assertEquals(values.size(), multiPairs.size()); - for (int i = 0; i < values.size(); i++) { - assertEquals(apiClient.escapeString(apiClient.parameterToString(values.get(i))), multiPairs.get(i).getValue()); - } - - // all other formats - for (String collectionFormat : collectionFormatMap.keySet()) { - List pairs = apiClient.parameterToPairs(collectionFormat, name, values); - - assertEquals(1, pairs.size()); - - String delimiter = collectionFormatMap.get(collectionFormat); - if (!delimiter.equals(",")) { - // commas are not escaped because they are reserved characters in URIs - delimiter = apiClient.escapeString(delimiter); - } - String[] pairValueSplit = pairs.get(0).getValue().split(delimiter); - - // must equal input values - assertEquals(values.size(), pairValueSplit.length); - for (int i = 0; i < values.size(); i++) { - assertEquals(apiClient.escapeString(apiClient.parameterToString(values.get(i))), pairValueSplit[i]); - } - } - } - - @Test - public void testSanitizeFilename() { - assertEquals("sun", apiClient.sanitizeFilename("sun")); - assertEquals("sun.gif", apiClient.sanitizeFilename("sun.gif")); - assertEquals("sun.gif", apiClient.sanitizeFilename("../sun.gif")); - assertEquals("sun.gif", apiClient.sanitizeFilename("/var/tmp/sun.gif")); - assertEquals("sun.gif", apiClient.sanitizeFilename("./sun.gif")); - assertEquals("sun.gif", apiClient.sanitizeFilename("..\\sun.gif")); - assertEquals("sun.gif", apiClient.sanitizeFilename("\\var\\tmp\\sun.gif")); - assertEquals("sun.gif", apiClient.sanitizeFilename("c:\\var\\tmp\\sun.gif")); - assertEquals("sun.gif", apiClient.sanitizeFilename(".\\sun.gif")); - } - - @Test - public void testNewHttpClient() { - OkHttpClient oldClient = apiClient.getHttpClient(); - apiClient.setHttpClient(oldClient.newBuilder().build()); - assertThat(apiClient.getHttpClient(), is(not(oldClient))); - } - - /** - * Tests the invariant that the HttpClient for the ApiClient must never be null - */ - @Test(expected = NullPointerException.class) - public void testNullHttpClient() { - apiClient.setHttpClient(null); - } -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/JSONTest.java b/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/JSONTest.java deleted file mode 100644 index 1c825e3925..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/JSONTest.java +++ /dev/null @@ -1,202 +0,0 @@ -package org.openapitools.client; - -import com.google.gson.reflect.TypeToken; - -import org.openapitools.client.model.Order; - -import java.lang.Exception; -import java.lang.reflect.Type; -import java.nio.charset.StandardCharsets; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Calendar; -import java.util.Date; -import java.util.GregorianCalendar; -import java.util.Locale; -import java.util.TimeZone; - -import okio.ByteString; -import org.junit.*; -import org.threeten.bp.LocalDate; -import org.threeten.bp.OffsetDateTime; -import org.threeten.bp.ZoneId; -import org.threeten.bp.ZoneOffset; -import org.threeten.bp.format.DateTimeFormatter; - -import static org.junit.Assert.*; - -public class JSONTest { - private ApiClient apiClient = null; - private JSON json = null; - private Order order = null; - - @Before - public void setup() { - apiClient = new ApiClient(); - json = apiClient.getJSON(); - order = new Order(); - } - - @Test - public void testSqlDateTypeAdapter() { - final String str = "\"2015-11-07\""; - final java.sql.Date date = java.sql.Date.valueOf("2015-11-07"); - - assertEquals(str, json.serialize(date)); - assertEquals(json.deserialize(str, java.sql.Date.class), date); - assertEquals(json.deserialize("\"2015-11-07T03:49:09.356" + getCurrentTimezoneOffset() + "\"", java.sql.Date.class).toString(), date.toString()); - - // custom date format: without day - DateFormat format = new SimpleDateFormat("yyyy-MM", Locale.ROOT); - apiClient.setSqlDateFormat(format); - String dateStr = "\"2015-11\""; - assertEquals(dateStr, json.serialize(json.deserialize("\"2015-11-07T03:49:09Z\"", java.sql.Date.class))); - assertEquals(dateStr, json.serialize(json.deserialize("\"2015-11\"", java.sql.Date.class))); - } - - @Test - public void testDateTypeAdapter() { - Calendar cal = new GregorianCalendar(2015, 10, 7, 3, 49, 9); - cal.setTimeZone(TimeZone.getTimeZone("UTC")); - - assertEquals(json.deserialize("\"2015-11-07T05:49:09+02\"", Date.class), cal.getTime()); - - cal.set(Calendar.MILLISECOND, 300); - assertEquals(json.deserialize("\"2015-11-07T03:49:09.3Z\"", Date.class), cal.getTime()); - - cal.set(Calendar.MILLISECOND, 356); - Date date = cal.getTime(); - - final String utcDate = "\"2015-11-07T03:49:09.356Z\""; - assertEquals(json.deserialize(utcDate, Date.class), date); - assertEquals(json.deserialize("\"2015-11-07T03:49:09.356+00:00\"", Date.class), date); - assertEquals(json.deserialize("\"2015-11-07T05:49:09.356+02:00\"", Date.class), date); - assertEquals(json.deserialize("\"2015-11-07T02:49:09.356-01:00\"", Date.class), date); - assertEquals(json.deserialize("\"2015-11-07T03:49:09.356Z\"", Date.class), date); - assertEquals(json.deserialize("\"2015-11-07T03:49:09.356+00\"", Date.class), date); - assertEquals(json.deserialize("\"2015-11-07T02:49:09.356-0100\"", Date.class), date); - assertEquals(json.deserialize("\"2015-11-07T03:49:09.356456789Z\"", Date.class), date); - - assertEquals(utcDate, json.serialize(date)); - - // custom datetime format: without milli-seconds, custom time zone - DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.ROOT); - format.setTimeZone(TimeZone.getTimeZone("GMT+10")); - apiClient.setDateFormat(format); - - String dateStr = "\"2015-11-07T13:49:09+10:00\""; - assertEquals(dateStr, json.serialize(json.deserialize("\"2015-11-07T03:49:09+00:00\"", Date.class))); - assertEquals(dateStr, json.serialize(json.deserialize("\"2015-11-07T03:49:09Z\"", Date.class))); - assertEquals(dateStr, json.serialize(json.deserialize("\"2015-11-07T00:49:09-03:00\"", Date.class))); - - try { - // invalid time zone format - json.deserialize("\"2015-11-07T03:49:09+00\"", Date.class); - fail("json parsing should fail"); - } catch (RuntimeException e) { - // OK - } - try { - // unexpected miliseconds - json.deserialize("\"2015-11-07T03:49:09.000Z\"", Date.class); - fail("json parsing should fail"); - } catch (RuntimeException e) { - // OK - } - - } - - @Test - public void testOffsetDateTimeTypeAdapter() { - final String str = "\"2016-09-09T08:02:03.123-03:00\""; - OffsetDateTime date = OffsetDateTime.of(2016, 9, 9, 8, 2, 3, 123000000, ZoneOffset.of("-3")); - - assertEquals(str, json.serialize(date)); - //Use toString() instead of isEqual to verify that the offset is preserved - assertEquals(json.deserialize(str, OffsetDateTime.class).toString(), date.toString()); - } - - @Test - public void testLocalDateTypeAdapter() { - final String str = "\"2016-09-09\""; - final LocalDate date = LocalDate.of(2016, 9, 9); - - assertEquals(str, json.serialize(date)); - assertEquals(json.deserialize(str, LocalDate.class), date); - } - - - @Test - public void testDefaultDate() throws Exception { - final DateTimeFormatter datetimeFormat = DateTimeFormatter.ISO_OFFSET_DATE_TIME; - final String dateStr = "2015-11-07T14:11:05.267Z"; - order.setShipDate(datetimeFormat.parse(dateStr, OffsetDateTime.FROM)); - - String str = json.serialize(order); - Type type = new TypeToken() { }.getType(); - Order o = json.deserialize(str, type); - assertEquals(dateStr, datetimeFormat.format(o.getShipDate())); - } - - @Test - public void testCustomDate() throws Exception { - final DateTimeFormatter datetimeFormat = DateTimeFormatter.ISO_OFFSET_DATE_TIME.withZone(ZoneId.of("Etc/GMT+2")); - final String dateStr = "2015-11-07T14:11:05-02:00"; - order.setShipDate(datetimeFormat.parse(dateStr, OffsetDateTime.FROM)); - - String str = json.serialize(order); - Type type = new TypeToken() { }.getType(); - Order o = json.deserialize(str, type); - assertEquals(dateStr, datetimeFormat.format(o.getShipDate())); - } - - @Test - public void testByteArrayTypeAdapterSerialization() { - // Arrange - final String expectedBytesAsString = "Let's pretend this a jpg or something"; - final byte[] expectedBytes = expectedBytesAsString.getBytes(StandardCharsets.UTF_8); - - // Act - String serializedBytesWithQuotes = json.serialize(expectedBytes); - - // Assert - String serializedBytes = serializedBytesWithQuotes.substring(1, serializedBytesWithQuotes.length() - 1); - if (json.getGson().htmlSafe()) { - serializedBytes = serializedBytes.replaceAll("\\\\u003d", "="); - } - ByteString actualAsByteString = ByteString.decodeBase64(serializedBytes); - byte[] actualBytes = actualAsByteString.toByteArray(); - assertEquals(expectedBytesAsString, new String(actualBytes, StandardCharsets.UTF_8)); - } - - @Test - public void testByteArrayTypeAdapterDeserialization() { - // Arrange - final String expectedBytesAsString = "Let's pretend this a jpg or something"; - final byte[] expectedBytes = expectedBytesAsString.getBytes(StandardCharsets.UTF_8); - final ByteString expectedByteString = ByteString.of(expectedBytes); - final String serializedBytes = expectedByteString.base64(); - final String serializedBytesWithQuotes = "\"" + serializedBytes + "\""; - Type type = new TypeToken() { }.getType(); - - // Act - byte[] actualDeserializedBytes = json.deserialize(serializedBytesWithQuotes, type); - - // Assert - assertEquals(expectedBytesAsString, new String(actualDeserializedBytes, StandardCharsets.UTF_8)); - } - - // Obtained 22JAN2018 from stackoverflow answer by PuguaSoft https://stackoverflow.com/questions/11399491/java-timezone-offset - // Direct link https://stackoverflow.com/a/16680815/3166133 - public static String getCurrentTimezoneOffset() { - - TimeZone tz = TimeZone.getDefault(); - Calendar cal = GregorianCalendar.getInstance(tz, Locale.ROOT); - int offsetInMillis = tz.getOffset(cal.getTimeInMillis()); - - String offset = String.format(Locale.ROOT,"%02d:%02d", Math.abs(offsetInMillis / 3600000), Math.abs((offsetInMillis / 60000) % 60)); - offset = (offsetInMillis >= 0 ? "+" : "-") + offset; - - return offset; - } -} \ No newline at end of file diff --git a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/api/PetApiTest.java b/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/api/PetApiTest.java deleted file mode 100644 index 9562854f24..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/api/PetApiTest.java +++ /dev/null @@ -1,564 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.Pet; -import org.openapitools.client.auth.*; -import org.openapitools.client.model.*; -import org.openapitools.client.*; - -import java.lang.reflect.Type; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.TimeUnit; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.ThreadLocalRandom; -import java.io.BufferedWriter; -import java.io.File; -import java.io.FileWriter; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.junit.*; - -import static org.junit.Assert.*; - -/** - * API tests for PetApi - */ -public class PetApiTest { - - private PetApi api = new PetApi(); - private static final Logger LOG = LoggerFactory.getLogger(PetApiTest.class); - // In the circle.yml file, /etc/host is configured with an entry to resolve petstore.swagger.io to 127.0.0.1 - private static String basePath = "http://petstore.swagger.io:80/v2"; - - @Before - public void setup() { - // setup authentication - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) api.getApiClient().getAuthentication("api_key"); - apiKeyAuth.setApiKey("special-key"); - api.getApiClient().setBasePath(basePath); - } - - @Test - public void testApiClient() { - // the default api client is used - assertEquals(Configuration.getDefaultApiClient(), api.getApiClient()); - assertNotNull(api.getApiClient()); - assertEquals(basePath, api.getApiClient().getBasePath()); - assertFalse(api.getApiClient().isDebugging()); - - ApiClient oldClient = api.getApiClient(); - - ApiClient newClient = new ApiClient(); - newClient.setVerifyingSsl(true); - newClient.setBasePath("http://example.com"); - newClient.setDebugging(true); - - // set api client via constructor - api = new PetApi(newClient); - assertNotNull(api.getApiClient()); - assertEquals("http://example.com", api.getApiClient().getBasePath()); - assertTrue(api.getApiClient().isDebugging()); - - // set api client via setter method - api.setApiClient(oldClient); - assertNotNull(api.getApiClient()); - assertEquals(basePath, api.getApiClient().getBasePath()); - assertFalse(api.getApiClient().isDebugging()); - } - - @Test - public void testCreateAndGetPet() throws Exception { - Pet pet = createPet(); - api.addPet(pet); - - Pet fetched = api.getPetById(pet.getId()); - assertPetMatches(pet, fetched); - api.deletePet(pet.getId(), null); - } - - @Test - public void testCreateAndGetPetWithHttpInfo() throws Exception { - Pet pet = createPet(); - api.addPetWithHttpInfo(pet); - - ApiResponse resp = api.getPetByIdWithHttpInfo(pet.getId()); - assertEquals(200, resp.getStatusCode()); - assertEquals("application/json", resp.getHeaders().get("Content-Type").get(0)); - Pet fetched = resp.getData(); - - assertPetMatches(pet, fetched); - api.deletePet(pet.getId(), null); - } - - @Test - public void testCreateAndGetPetAsync() throws Exception { - Pet pet = createPet(); - api.addPet(pet); - // to store returned Pet or error message/exception - final Map result = new HashMap(); - - api.getPetByIdAsync(pet.getId(), new ApiCallback() { - @Override - public void onFailure(ApiException e, int statusCode, Map> responseHeaders) { - result.put("error", e.getMessage()); - } - - @Override - public void onSuccess(Pet pet, int statusCode, Map> responseHeaders) { - result.put("pet", pet); - } - - @Override - public void onUploadProgress(long bytesWritten, long contentLength, boolean done) { - //empty - } - - @Override - public void onDownloadProgress(long bytesRead, long contentLength, boolean done) { - //empty - } - }); - - // wait for the asynchronous call to finish (at most 10 seconds) - final int maxTry = 10; - int tryCount = 1; - Pet fetched = null; - do { - if (tryCount > maxTry) fail("have not got result of getPetByIdAsync after 10 seconds"); - Thread.sleep(1000); - tryCount += 1; - if (result.get("error") != null) fail((String) result.get("error")); - if (result.get("pet") != null) { - fetched = (Pet) result.get("pet"); - break; - } - } while (result.isEmpty()); - assertPetMatches(pet, fetched); - api.deletePet(pet.getId(), null); - } - - @Test - public void testCreateAndGetPetAsyncInvalidID() throws Exception { - Pet pet = createPet(); - api.addPet(pet); - // to store returned Pet or error message/exception - final Map result = new HashMap(); - - // test getting a nonexistent pet - result.clear(); - api.getPetByIdAsync(-10000L, new ApiCallback() { - @Override - public void onFailure(ApiException e, int statusCode, Map> responseHeaders) { - result.put("exception", e); - } - - @Override - public void onSuccess(Pet pet, int statusCode, Map> responseHeaders) { - result.put("pet", pet); - } - - @Override - public void onUploadProgress(long bytesWritten, long contentLength, boolean done) { - //empty - } - - @Override - public void onDownloadProgress(long bytesRead, long contentLength, boolean done) { - //empty - } - }); - - // wait for the asynchronous call to finish (at most 10 seconds) - final int maxTry = 10; - int tryCount = 1; - Pet fetched = null; - ApiException exception = null; - - do { - if (tryCount > maxTry) fail("have not got result of getPetByIdAsync after 10 seconds"); - Thread.sleep(1000); - tryCount += 1; - if (result.get("pet") != null) fail("expected an error"); - if (result.get("exception") != null) { - exception = (ApiException) result.get("exception"); - break; - } - } while (result.isEmpty()); - assertNotNull(exception); - assertEquals(404, exception.getCode()); - assertEquals("Not Found", exception.getMessage()); - assertEquals("application/json", exception.getResponseHeaders().get("Content-Type").get(0)); - api.deletePet(pet.getId(), null); - } - - @Test - public void testCreateAndGetMultiplePetsAsync() throws Exception { - Pet pet1 = createPet(); - Pet pet2 = createPet(); - - final CountDownLatch addLatch = new CountDownLatch(2); - final TestApiCallback addCallback1 = new TestApiCallback(addLatch); - final TestApiCallback addCallback2 = new TestApiCallback(addLatch); - - // Make 2 simultaneous calls - api.addPetAsync(pet1, addCallback1); - api.addPetAsync(pet2, addCallback2); - - // wait for both asynchronous calls to finish (at most 10 seconds) - assertTrue(addLatch.await(10, TimeUnit.SECONDS)); - - assertTrue(addCallback1.isDone()); - assertTrue(addCallback2.isDone()); - - if (!addCallback1.isSuccess()) throw addCallback1.getException(); - if (!addCallback2.isSuccess()) throw addCallback2.getException(); - - assertValidProgress(addCallback1.getUploadProgress()); - assertValidProgress(addCallback2.getUploadProgress()); - - final CountDownLatch getLatch = new CountDownLatch(3); - final TestApiCallback getCallback1 = new TestApiCallback(getLatch); - final TestApiCallback getCallback2 = new TestApiCallback(getLatch); - final TestApiCallback getCallback3 = new TestApiCallback(getLatch); - - api.getPetByIdAsync(pet1.getId(), getCallback1); - api.getPetByIdAsync(pet2.getId(), getCallback2); - // Get nonexistent pet - api.getPetByIdAsync(-10000L, getCallback3); - - // wait for all asynchronous calls to finish (at most 10 seconds) - assertTrue(getLatch.await(10, TimeUnit.SECONDS)); - - assertTrue(getCallback1.isDone()); - assertTrue(getCallback2.isDone()); - assertTrue(getCallback3.isDone()); - - if (!getCallback1.isSuccess()) throw getCallback1.getException(); - if (!getCallback2.isSuccess()) throw getCallback2.getException(); - - assertPetMatches(pet1, getCallback1.getResult()); - assertPetMatches(pet2, getCallback2.getResult()); - - assertValidProgress(getCallback1.getDownloadProgress()); - assertValidProgress(getCallback2.getDownloadProgress()); - - // Last callback should fail with ApiException - assertFalse(getCallback3.isSuccess()); - final ApiException exception = getCallback3.getException(); - assertNotNull(exception); - assertEquals(404, exception.getCode()); - api.deletePet(pet1.getId(), null); - api.deletePet(pet2.getId(), null); - } - - - @Test - public void testUpdatePet() throws Exception { - Pet pet = createPet(); - api.addPet(pet); - pet.setName("programmer"); - - api.updatePet(pet); - - Pet fetched = api.getPetById(pet.getId()); - assertPetMatches(pet, fetched); - api.deletePet(pet.getId(), null); - } - - @Test - public void testFindPetsByStatus() throws Exception { - assertEquals(basePath, api.getApiClient().getBasePath()); - Pet pet = createPet(); - api.addPet(pet); - pet.setName("programmer"); - pet.setStatus(Pet.StatusEnum.PENDING); - api.updatePet(pet); - - List pets = api.findPetsByStatus(Arrays.asList("pending")); - assertNotNull(pets); - - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - - assertTrue(found); - - api.deletePet(pet.getId(), null); - } - - @Test - @Ignore - public void testFindPetsByTags() throws Exception { - Pet pet = createPet(); - pet.setName("monster"); - pet.setStatus(Pet.StatusEnum.AVAILABLE); - - List tags = new ArrayList(); - Tag tag1 = new Tag(); - tag1.setName("friendly"); - tags.add(tag1); - pet.setTags(tags); - - api.updatePet(pet); - - Set pets = api.findPetsByTags(new HashSet<>(Arrays.asList("friendly"))); - assertNotNull(pets); - - boolean found = false; - for (Pet fetched : pets) { - if (fetched.getId().equals(pet.getId())) { - found = true; - break; - } - } - assertTrue(found); - - api.deletePet(pet.getId(), null); - } - - @Test - public void testUpdatePetWithForm() throws Exception { - Pet pet = createPet(); - pet.setName("frank"); - api.addPet(pet); - - Pet fetched = api.getPetById(pet.getId()); - - api.updatePetWithForm(fetched.getId(), "furt", null); - Pet updated = api.getPetById(fetched.getId()); - - assertEquals(updated.getName(), "furt"); - api.deletePet(pet.getId(), null); - } - - @Test - public void testDeletePet() throws Exception { - Pet pet = createPet(); - api.addPet(pet); - - Pet fetched = api.getPetById(pet.getId()); - api.deletePet(pet.getId(), null); - - try { - fetched = api.getPetById(fetched.getId()); - fail("expected an error"); - } catch (ApiException e) { - LOG.info("Code: {}. Message: {}", e.getCode(), e.getMessage()); - assertEquals(404, e.getCode()); - } - } - - @Test - public void testUploadFile() throws Exception { - Pet pet = createPet(); - api.addPet(pet); - - File file = new File("hello.txt"); - BufferedWriter writer = new BufferedWriter(new FileWriter(file)); - writer.write("Hello world!"); - writer.close(); - - api.uploadFile(pet.getId(), "a test file", new File(file.getAbsolutePath())); - api.deletePet(pet.getId(), null); - } - - @Test - public void testEqualsAndHashCode() { - Pet pet1 = new Pet(); - Pet pet2 = new Pet(); - assertTrue(pet1.equals(pet2)); - assertTrue(pet2.equals(pet1)); - assertTrue(pet1.hashCode() == pet2.hashCode()); - assertTrue(pet1.equals(pet1)); - assertTrue(pet1.hashCode() == pet1.hashCode()); - - pet2.setName("really-happy"); - pet2.setPhotoUrls(new HashSet<>(Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2"))); - assertFalse(pet1.equals(pet2)); - assertFalse(pet2.equals(pet1)); - assertFalse(pet1.hashCode() == (pet2.hashCode())); - assertTrue(pet2.equals(pet2)); - assertTrue(pet2.hashCode() == pet2.hashCode()); - - pet1.setName("really-happy"); - pet1.setPhotoUrls(new HashSet<>(Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2"))); - assertTrue(pet1.equals(pet2)); - assertTrue(pet2.equals(pet1)); - assertTrue(pet1.hashCode() == pet2.hashCode()); - assertTrue(pet1.equals(pet1)); - assertTrue(pet1.hashCode() == pet1.hashCode()); - } - - - private Pet createPet() { - Pet pet = new Pet(); - pet.setId(ThreadLocalRandom.current().nextLong(Long.MAX_VALUE)); - pet.setName("gorilla"); - - Category category = new Category(); - category.setName("really-happy"); - - pet.setCategory(category); - pet.setStatus(Pet.StatusEnum.AVAILABLE); - Set photos = new HashSet<>(Arrays.asList("http://foo.bar.com/1", "http://foo.bar.com/2")); - pet.setPhotoUrls(photos); - - return pet; - } - - private String serializeJson(Object o, ApiClient apiClient) { - return apiClient.getJSON().serialize(o); - } - - private T deserializeJson(String json, Type type, ApiClient apiClient) { - return (T) apiClient.getJSON().deserialize(json, type); - } - - private void assertPetMatches(Pet expected, Pet actual) { - assertNotNull(actual); - assertEquals(expected.getId(), actual.getId()); - assertNotNull(actual.getCategory()); - assertEquals(expected.getCategory().getName(), - actual.getCategory().getName()); - } - - /** - * Assert that the given upload/download progress list satisfies the - * following constraints: - *

- * - List is not empty - * - Byte count should be nondecreasing - * - The last element, and only the last element, should have done=true - */ - private void assertValidProgress(List progressList) { - assertFalse(progressList.isEmpty()); - - Progress prev = null; - int index = 0; - for (Progress progress : progressList) { - if (prev != null) { - if (prev.done || prev.bytes > progress.bytes) { - fail("Progress list out of order at index " + index - + ": " + progressList); - } - } - prev = progress; - index += 1; - } - - if (!prev.done) { - fail("Last progress item should have done=true: " + progressList); - } - } - - private static class TestApiCallback implements ApiCallback { - - private final CountDownLatch latch; - private final ConcurrentLinkedQueue uploadProgress = - new ConcurrentLinkedQueue(); - private final ConcurrentLinkedQueue downloadProgress = - new ConcurrentLinkedQueue(); - - private boolean done; - private boolean success; - private ApiException exception; - private T result; - - public TestApiCallback(CountDownLatch latch) { - this.latch = latch; - this.done = false; - } - - @Override - public void onFailure(ApiException e, int statusCode, Map> responseHeaders) { - exception = e; - this.done = true; - this.success = false; - latch.countDown(); - } - - @Override - public void onSuccess(T result, int statusCode, Map> responseHeaders) { - this.result = result; - this.done = true; - this.success = true; - latch.countDown(); - } - - @Override - public void onUploadProgress(long bytesWritten, long contentLength, boolean done) { - uploadProgress.add(new Progress(bytesWritten, contentLength, done)); - } - - @Override - public void onDownloadProgress(long bytesRead, long contentLength, boolean done) { - downloadProgress.add(new Progress(bytesRead, contentLength, done)); - } - - public boolean isDone() { - return done; - } - - public boolean isSuccess() { - return success; - } - - public ApiException getException() { - return exception; - } - - public T getResult() { - return result; - } - - public List getUploadProgress() { - return new ArrayList(uploadProgress); - } - - public List getDownloadProgress() { - return new ArrayList(downloadProgress); - } - } - - private static class Progress { - public final long bytes; - public final long contentLength; - public final boolean done; - - public Progress(long bytes, long contentLength, boolean done) { - this.bytes = bytes; - this.contentLength = contentLength; - this.done = done; - } - - @Override - public String toString() { - return ""; - } - } -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/auth/ApiKeyAuthTest.java b/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/auth/ApiKeyAuthTest.java deleted file mode 100644 index da25043b27..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/auth/ApiKeyAuthTest.java +++ /dev/null @@ -1,119 +0,0 @@ -package org.openapitools.client.auth; - -import java.util.HashMap; -import java.util.ArrayList; -import java.util.Map; -import java.util.List; - -import org.openapitools.client.Pair; -import org.junit.*; -import static org.junit.Assert.*; - - -public class ApiKeyAuthTest { - @Test - public void testApplyToParamsInQuery() { - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map cookieParams = new HashMap(); - - ApiKeyAuth auth = new ApiKeyAuth("query", "api_key"); - auth.setApiKey("my-api-key"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - assertEquals(1, queryParams.size()); - for (Pair queryParam : queryParams) { - assertEquals("my-api-key", queryParam.getValue()); - } - - // no changes to header or cookie parameters - assertEquals(0, headerParams.size()); - assertEquals(0, cookieParams.size()); - } - - @Test - public void testApplyToParamsInQueryWithNullValue() { - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map cookieParams = new HashMap(); - - ApiKeyAuth auth = new ApiKeyAuth("query", "api_key"); - auth.setApiKey(null); - auth.applyToParams(queryParams, headerParams, cookieParams); - - // no changes to parameters - assertEquals(0, queryParams.size()); - assertEquals(0, headerParams.size()); - assertEquals(0, cookieParams.size()); - } - - @Test - public void testApplyToParamsInHeaderWithPrefix() { - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map cookieParams = new HashMap(); - - ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN"); - auth.setApiKey("my-api-token"); - auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - // no changes to query or cookie parameters - assertEquals(0, queryParams.size()); - assertEquals(0, cookieParams.size()); - assertEquals(1, headerParams.size()); - assertEquals("Token my-api-token", headerParams.get("X-API-TOKEN")); - } - - @Test - public void testApplyToParamsInHeaderWithNullValue() { - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map cookieParams = new HashMap(); - - ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN"); - auth.setApiKey(null); - auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - // no changes to parameters - assertEquals(0, queryParams.size()); - assertEquals(0, cookieParams.size()); - assertEquals(0, headerParams.size()); - } - - @Test - public void testApplyToParamsInCookieWithPrefix() { - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map cookieParams = new HashMap(); - - ApiKeyAuth auth = new ApiKeyAuth("cookie", "X-API-TOKEN"); - auth.setApiKey("my-api-token"); - auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - // no changes to query or header parameters - assertEquals(0, queryParams.size()); - assertEquals(0, headerParams.size()); - assertEquals(1, cookieParams.size()); - assertEquals("Token my-api-token", cookieParams.get("X-API-TOKEN")); - } - - @Test - public void testApplyToParamsInCookieWithNullValue() { - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map cookieParams = new HashMap(); - - ApiKeyAuth auth = new ApiKeyAuth("cookie", "X-API-TOKEN"); - auth.setApiKey(null); - auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - // no changes to parameters - assertEquals(0, queryParams.size()); - assertEquals(0, cookieParams.size()); - assertEquals(0, headerParams.size()); - } -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/auth/HttpBasicAuthTest.java b/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/auth/HttpBasicAuthTest.java deleted file mode 100644 index e963ea24f7..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/auth/HttpBasicAuthTest.java +++ /dev/null @@ -1,64 +0,0 @@ -package org.openapitools.client.auth; - -import java.util.HashMap; -import java.util.ArrayList; -import java.util.Map; -import java.util.List; - -import org.openapitools.client.Pair; -import org.junit.*; -import static org.junit.Assert.*; - - -public class HttpBasicAuthTest { - HttpBasicAuth auth = null; - - @Before - public void setup() { - auth = new HttpBasicAuth(); - } - - @Test - public void testApplyToParams() { - List queryParams = new ArrayList(); - Map headerParams = new HashMap(); - Map cookieParams = new HashMap(); - - auth.setUsername("my-username"); - auth.setPassword("my-password"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - // no changes to query or cookie parameters - assertEquals(0, queryParams.size()); - assertEquals(0, cookieParams.size()); - assertEquals(1, headerParams.size()); - // the string below is base64-encoded result of "my-username:my-password" with the "Basic " prefix - String expected = "Basic bXktdXNlcm5hbWU6bXktcGFzc3dvcmQ="; - assertEquals(expected, headerParams.get("Authorization")); - - // null username should be treated as empty string - auth.setUsername(null); - auth.applyToParams(queryParams, headerParams, cookieParams); - // the string below is base64-encoded result of ":my-password" with the "Basic " prefix - expected = "Basic Om15LXBhc3N3b3Jk"; - assertEquals(expected, headerParams.get("Authorization")); - - // null password should be treated as empty string - auth.setUsername("my-username"); - auth.setPassword(null); - auth.applyToParams(queryParams, headerParams, cookieParams); - // the string below is base64-encoded result of "my-username:" with the "Basic " prefix - expected = "Basic bXktdXNlcm5hbWU6"; - assertEquals(expected, headerParams.get("Authorization")); - - // null username and password should be ignored - queryParams = new ArrayList(); - headerParams = new HashMap(); - auth.setUsername(null); - auth.setPassword(null); - auth.applyToParams(queryParams, headerParams, cookieParams); - // no changes to parameters - assertEquals(0, queryParams.size()); - assertEquals(0, headerParams.size()); - } -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/model/ArrayOfArrayOfNumberOnlyTest.java b/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/model/ArrayOfArrayOfNumberOnlyTest.java deleted file mode 100644 index 27121aec51..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/model/ArrayOfArrayOfNumberOnlyTest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import org.apache.commons.lang3.builder.EqualsBuilder; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - -/** - * Model tests for ArrayOfArrayOfNumberOnly - */ -public class ArrayOfArrayOfNumberOnlyTest { - private final ArrayOfArrayOfNumberOnly model = new ArrayOfArrayOfNumberOnly(); - - /** - * Model tests for ArrayOfArrayOfNumberOnly - */ - @Test - public void test() { - // TODO: test ArrayOfArrayOfNumberOnly - } - - /** - * Test the property 'arrayArrayNumber' - */ - @Test - public void arrayArrayNumberTest() { - BigDecimal b1 = new BigDecimal("12.3"); - BigDecimal b2 = new BigDecimal("5.6"); - List arrayArrayNumber = new ArrayList(); - arrayArrayNumber.add(b1); - arrayArrayNumber.add(b2); - model.setArrayArrayNumber(new ArrayList>()); - model.getArrayArrayNumber().add(arrayArrayNumber); - - // create another instance for comparison - BigDecimal b3 = new BigDecimal("12.3"); - BigDecimal b4 = new BigDecimal("5.6"); - ArrayOfArrayOfNumberOnly model2 = new ArrayOfArrayOfNumberOnly(); - List arrayArrayNumber2 = new ArrayList(); - arrayArrayNumber2.add(b1); - arrayArrayNumber2.add(b2); - model2.setArrayArrayNumber(new ArrayList>()); - model2.getArrayArrayNumber().add(arrayArrayNumber2); - - Assert.assertTrue(model2.equals(model)); - } - -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/model/EnumValueTest.java b/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/model/EnumValueTest.java deleted file mode 100644 index 73440e547b..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/model/EnumValueTest.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.openapitools.client.model; - -import org.junit.Test; - -import com.google.gson.Gson; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -public class EnumValueTest { - - @Test - public void testEnumClass() { - assertEquals(EnumClass._ABC.toString(), "_abc"); - assertEquals(EnumClass._EFG.toString(), "-efg"); - assertEquals(EnumClass._XYZ_.toString(), "(xyz)"); - } - - @Test - public void testEnumTest() { - // test enum value - EnumTest enumTest = new EnumTest(); - enumTest.setEnumString(EnumTest.EnumStringEnum.LOWER); - enumTest.setEnumInteger(EnumTest.EnumIntegerEnum.NUMBER_1); - enumTest.setEnumNumber(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1); - - assertEquals(EnumTest.EnumStringEnum.UPPER.toString(), "UPPER"); - assertEquals(EnumTest.EnumStringEnum.UPPER.getValue(), "UPPER"); - assertEquals(EnumTest.EnumStringEnum.LOWER.toString(), "lower"); - assertEquals(EnumTest.EnumStringEnum.LOWER.getValue(), "lower"); - - assertEquals(EnumTest.EnumIntegerEnum.NUMBER_1.toString(), "1"); - assertTrue(EnumTest.EnumIntegerEnum.NUMBER_1.getValue() == 1); - assertEquals(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.toString(), "-1"); - assertTrue(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.getValue() == -1); - - assertEquals(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.toString(), "1.1"); - assertTrue(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.getValue() == 1.1); - assertEquals(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.toString(), "-1.2"); - assertTrue(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.getValue() == -1.2); - - // test serialization - Gson gson = new Gson(); - String json = gson.toJson(enumTest); - assertEquals(json, "{\"enum_string\":\"lower\",\"enum_integer\":1,\"enum_number\":1.1}"); - - // test deserialization - EnumTest fromString = gson.fromJson(json, EnumTest.class); - assertEquals(fromString.getEnumString().toString(), "lower"); - assertEquals(fromString.getEnumString().getValue(), "lower"); - assertEquals(fromString.getEnumInteger().toString(), "1"); - assertTrue(fromString.getEnumInteger().getValue() == 1); - assertEquals(fromString.getEnumNumber().toString(), "1.1"); - assertTrue(fromString.getEnumNumber().getValue() == 1.1); - } -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/model/PetTest.java b/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/model/PetTest.java deleted file mode 100644 index 3f4c1e8365..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/model/PetTest.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * OpenAPI Petstore - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.Category; -import org.openapitools.client.model.Tag; -import org.junit.Assert; -import org.junit.Ignore; -import org.junit.Test; - - -/** - * Model tests for Pet - */ -public class PetTest { - private final Pet model = new Pet(); - - /** - * Model tests for Pet - */ - @Test - public void testPet() { - // test Pet - model.setId(1029L); - model.setName("Dog"); - - Pet model2 = new Pet(); - model2.setId(1029L); - model2.setName("Dog"); - - Assert.assertTrue(model.equals(model2)); - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'category' - */ - @Test - public void categoryTest() { - // TODO: test category - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'photoUrls' - */ - @Test - public void photoUrlsTest() { - // TODO: test photoUrls - } - - /** - * Test the property 'tags' - */ - @Test - public void tagsTest() { - // TODO: test tags - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/resttemplate/ApiClientTest.java b/CI/samples.ci/client/petstore/java/test-manual/resttemplate/ApiClientTest.java deleted file mode 100644 index 62068d754e..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/resttemplate/ApiClientTest.java +++ /dev/null @@ -1,253 +0,0 @@ -package org.openapitools.client; - -import org.openapitools.client.auth.*; - -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.*; - -import org.junit.*; -import org.springframework.http.MediaType; -import org.springframework.util.MultiValueMap; - -import static org.junit.Assert.*; - - -public class ApiClientTest { - ApiClient apiClient = null; - - @Before - public void setup() { - apiClient = new ApiClient(); - } - - /** - * - */ - @Test - public void testParseAndFormatDate() { - // default date format - String dateStr = "2015-11-07T03:49:09.356Z"; - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09.356+00:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09.356Z"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T05:49:09.356+02:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T02:49:09.356-01:00"))); - - // custom date format: without milli-seconds, custom time zone - DateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX", Locale.ROOT); - format.setTimeZone(TimeZone.getTimeZone("GMT+10")); - apiClient.setDateFormat(format); - dateStr = "2015-11-07T13:49:09+10:00"; - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09+00:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T03:49:09Z"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T00:49:09-03:00"))); - assertEquals(dateStr, apiClient.formatDate(apiClient.parseDate("2015-11-07T13:49:09+10:00"))); - } - - @Test - public void testIsJsonMime() { - assertFalse(apiClient.isJsonMime((String) null)); - assertFalse(apiClient.isJsonMime("")); - assertFalse(apiClient.isJsonMime("text/plain")); - assertFalse(apiClient.isJsonMime("application/xml")); - assertFalse(apiClient.isJsonMime("application/jsonp")); - assertFalse(apiClient.isJsonMime("example/json")); - assertFalse(apiClient.isJsonMime("example/foo+bar+jsonx")); - assertFalse(apiClient.isJsonMime("example/foo+bar+xjson")); - - assertTrue(apiClient.isJsonMime("application/json")); - assertTrue(apiClient.isJsonMime("application/json; charset=UTF8")); - assertTrue(apiClient.isJsonMime("APPLICATION/JSON")); - - assertTrue(apiClient.isJsonMime("application/problem+json")); - assertTrue(apiClient.isJsonMime("APPLICATION/PROBLEM+JSON")); - assertTrue(apiClient.isJsonMime("application/json\t")); - assertTrue(apiClient.isJsonMime("example/foo+bar+json")); - assertTrue(apiClient.isJsonMime("example/foo+json;x;y")); - assertTrue(apiClient.isJsonMime("example/foo+json\t;")); - assertTrue(apiClient.isJsonMime("Example/fOO+JSON")); - } - - @Test - public void testSelectHeaderAccept() { - String[] accepts = {"application/json", "application/xml"}; - assertEquals(Arrays.asList(MediaType.parseMediaType("application/json")), apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{"APPLICATION/XML", "APPLICATION/JSON"}; - assertEquals(Arrays.asList(MediaType.parseMediaType("APPLICATION/JSON")), apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{"application/xml", "application/json; charset=UTF8"}; - assertEquals(Arrays.asList(MediaType.parseMediaType("application/json; charset=UTF8")), apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{"text/plain", "application/xml"}; - assertEquals(Arrays.asList(MediaType.parseMediaType("text/plain"),MediaType.parseMediaType("application/xml")), apiClient.selectHeaderAccept(accepts)); - - accepts = new String[]{}; - assertNull(apiClient.selectHeaderAccept(accepts)); - } - - @Test - public void testSelectHeaderContentType() { - String[] contentTypes = {"application/json", "application/xml"}; - assertEquals(MediaType.parseMediaType("application/json"), apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{"APPLICATION/JSON", "APPLICATION/XML"}; - assertEquals(MediaType.parseMediaType("APPLICATION/JSON"), apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{"application/xml", "application/json; charset=UTF8"}; - assertEquals(MediaType.parseMediaType("application/json; charset=UTF8"), apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{"text/plain", "application/xml"}; - assertEquals(MediaType.parseMediaType("text/plain"), apiClient.selectHeaderContentType(contentTypes)); - - contentTypes = new String[]{}; - assertEquals(MediaType.parseMediaType("application/json"), apiClient.selectHeaderContentType(contentTypes)); - } - - @Test - public void testGetAuthentications() { - Map auths = apiClient.getAuthentications(); - - Authentication auth = auths.get("api_key"); - assertNotNull(auth); - assertTrue(auth instanceof ApiKeyAuth); - ApiKeyAuth apiKeyAuth = (ApiKeyAuth) auth; - assertEquals("header", apiKeyAuth.getLocation()); - assertEquals("api_key", apiKeyAuth.getParamName()); - - auth = auths.get("petstore_auth"); - assertTrue(auth instanceof OAuth); - assertSame(auth, apiClient.getAuthentication("petstore_auth")); - - assertNull(auths.get("unknown")); - - try { - auths.put("my_auth", new HttpBasicAuth()); - fail("the authentications returned should not be modifiable"); - } catch (UnsupportedOperationException e) { - } - } - - @Test - public void testSetUsernameAndPassword() { - HttpBasicAuth auth = null; - for (Authentication _auth : apiClient.getAuthentications().values()) { - if (_auth instanceof HttpBasicAuth) { - auth = (HttpBasicAuth) _auth; - break; - } - } - auth.setUsername(null); - auth.setPassword(null); - - apiClient.setUsername("my-username"); - apiClient.setPassword("my-password"); - assertEquals("my-username", auth.getUsername()); - assertEquals("my-password", auth.getPassword()); - - // reset values - auth.setUsername(null); - auth.setPassword(null); - } - - @Test - public void testSetApiKeyAndPrefix() { - ApiKeyAuth auth = null; - for (Authentication _auth : apiClient.getAuthentications().values()) { - if (_auth instanceof ApiKeyAuth) { - auth = (ApiKeyAuth) _auth; - break; - } - } - auth.setApiKey(null); - auth.setApiKeyPrefix(null); - - apiClient.setApiKey("my-api-key"); - apiClient.setApiKeyPrefix("Token"); - assertEquals("my-api-key", auth.getApiKey()); - assertEquals("Token", auth.getApiKeyPrefix()); - - // reset values - auth.setApiKey(null); - auth.setApiKeyPrefix(null); - } - - @Test - public void testParameterToMultiValueMapWhenNameIsInvalid() throws Exception { - MultiValueMap pairs_a = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.CSV, null, new Integer(1)); - MultiValueMap pairs_b = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.CSV, "", new Integer(1)); - - assertTrue(pairs_a.isEmpty()); - assertTrue(pairs_b.isEmpty()); - } - - @Test - public void testParameterToMultiValueMapWhenValueIsNull() throws Exception { - MultiValueMap pairs = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.CSV, "param-a", null); - - assertTrue(pairs.isEmpty()); - } - - @Test - public void testParameterToMultiValueMapWhenValueIsEmptyStrings() throws Exception { - - // single empty string - MultiValueMap pairs = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.CSV, "param-a", " "); - assertEquals(1, pairs.size()); - - // list of empty strings - List strs = new ArrayList(); - strs.add(" "); - strs.add(" "); - strs.add(" "); - - MultiValueMap concatStrings = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.CSV, "param-a", strs); - - assertEquals(1, concatStrings.get("param-a").size()); - assertFalse(concatStrings.get("param-a").isEmpty()); // should contain some delimiters - } - - @Test - public void testParameterToMultiValueMapWhenValueIsNotCollection() throws Exception { - String name = "param-a"; - Integer value = 1; - - MultiValueMap pairs = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.CSV, name, value); - - assertEquals(1, pairs.get(name).size()); - assertEquals(value, Integer.valueOf(pairs.get(name).get(0))); - } - - @Test - public void testParameterToMultiValueMapWhenValueIsCollection() throws Exception { - Map collectionFormatMap = new HashMap(); - collectionFormatMap.put(ApiClient.CollectionFormat.CSV, ","); - collectionFormatMap.put(ApiClient.CollectionFormat.TSV, "\t"); - collectionFormatMap.put(ApiClient.CollectionFormat.SSV, " "); - collectionFormatMap.put(ApiClient.CollectionFormat.PIPES, "\\|"); - collectionFormatMap.put(null, ","); // no format, must default to csv - - String name = "param-a"; - - List values = new ArrayList(); - values.add("value-a"); - values.add(123); - values.add(new Date()); - - // check for multi separately - MultiValueMap multiValueMap = apiClient.parameterToMultiValueMap(ApiClient.CollectionFormat.MULTI, name, values); - assertEquals(values.size(), multiValueMap.get(name).size()); - - // all other formats - for (ApiClient.CollectionFormat collectionFormat : collectionFormatMap.keySet()) { - MultiValueMap pairs = apiClient.parameterToMultiValueMap(collectionFormat, name, values); - - assertEquals(1, pairs.size()); - - String delimiter = collectionFormatMap.get(collectionFormat); - String[] pairValueSplit = pairs.get(name).get(0).split(delimiter); - - assertEquals(values.size(), pairValueSplit.length); - } - } -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/resttemplate/auth/ApiKeyAuthTest.java b/CI/samples.ci/client/petstore/java/test-manual/resttemplate/auth/ApiKeyAuthTest.java deleted file mode 100644 index 2a21136cfe..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/resttemplate/auth/ApiKeyAuthTest.java +++ /dev/null @@ -1,69 +0,0 @@ -package org.openapitools.client.auth; - -import java.util.HashMap; -import java.util.ArrayList; -import java.util.Map; -import java.util.List; - -import org.junit.*; -import org.springframework.http.HttpHeaders; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; - -import static org.junit.Assert.*; - -public class ApiKeyAuthTest { - @Test - public void testApplyToParamsInQuery() { - MultiValueMap queryParams = new LinkedMultiValueMap(); - HttpHeaders headerParams = new HttpHeaders(); - MultiValueMap cookieParams = new LinkedMultiValueMap(); - - ApiKeyAuth auth = new ApiKeyAuth("query", "api_key"); - auth.setApiKey("my-api-key"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - assertEquals(1, queryParams.size()); - assertEquals("my-api-key", queryParams.get("api_key").get(0)); - - // no changes to header or cookie parameters - assertEquals(0, headerParams.size()); - assertEquals(0, cookieParams.size()); - } - - @Test - public void testApplyToParamsInHeaderWithPrefix() { - MultiValueMap queryParams = new LinkedMultiValueMap(); - HttpHeaders headerParams = new HttpHeaders(); - MultiValueMap cookieParams = new LinkedMultiValueMap(); - - ApiKeyAuth auth = new ApiKeyAuth("header", "X-API-TOKEN"); - auth.setApiKey("my-api-token"); - auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - // no changes to query or cookie parameters - assertEquals(0, queryParams.size()); - assertEquals(0, cookieParams.size()); - assertEquals(1, headerParams.size()); - assertEquals("Token my-api-token", headerParams.get("X-API-TOKEN").get(0)); - } - - @Test - public void testApplyToParamsInCookieWithPrefix() { - MultiValueMap queryParams = new LinkedMultiValueMap(); - HttpHeaders headerParams = new HttpHeaders(); - MultiValueMap cookieParams = new LinkedMultiValueMap(); - - ApiKeyAuth auth = new ApiKeyAuth("cookie", "X-API-TOKEN"); - auth.setApiKey("my-api-token"); - auth.setApiKeyPrefix("Token"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - // no changes to query or cookie parameters - assertEquals(0, queryParams.size()); - assertEquals(0, headerParams.size()); - assertEquals(1, cookieParams.size()); - assertEquals("Token my-api-token", cookieParams.get("X-API-TOKEN").get(0)); - } -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/resttemplate/auth/HttpBasicAuthTest.java b/CI/samples.ci/client/petstore/java/test-manual/resttemplate/auth/HttpBasicAuthTest.java deleted file mode 100644 index 79eec957fc..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/resttemplate/auth/HttpBasicAuthTest.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.openapitools.client.auth; - -import java.util.HashMap; -import java.util.ArrayList; -import java.util.Map; -import java.util.List; - -import org.junit.*; -import org.springframework.http.HttpHeaders; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; - -import static org.junit.Assert.*; - -public class HttpBasicAuthTest { - HttpBasicAuth auth = null; - - @Before - public void setup() { - auth = new HttpBasicAuth(); - } - - @Test - public void testApplyToParams() { - MultiValueMap queryParams = new LinkedMultiValueMap(); - HttpHeaders headerParams = new HttpHeaders(); - MultiValueMap cookieParams = new LinkedMultiValueMap(); - - auth.setUsername("my-username"); - auth.setPassword("my-password"); - auth.applyToParams(queryParams, headerParams, cookieParams); - - // no changes to query or cookie parameters - assertEquals(0, queryParams.size()); - assertEquals(0, cookieParams.size()); - assertEquals(1, headerParams.size()); - // the string below is base64-encoded result of "my-username:my-password" with the "Basic " prefix - String expected = "Basic bXktdXNlcm5hbWU6bXktcGFzc3dvcmQ="; - assertEquals(expected, headerParams.get("Authorization").get(0)); - - // null username should be treated as empty string - auth.setUsername(null); - auth.applyToParams(queryParams, headerParams, cookieParams); - // the string below is base64-encoded result of ":my-password" with the "Basic " prefix - expected = "Basic Om15LXBhc3N3b3Jk"; - assertEquals(expected, headerParams.get("Authorization").get(1)); - - // null password should be treated as empty string - auth.setUsername("my-username"); - auth.setPassword(null); - auth.applyToParams(queryParams, headerParams, cookieParams); - // the string below is base64-encoded result of "my-username:" with the "Basic " prefix - expected = "Basic bXktdXNlcm5hbWU6"; - assertEquals(expected, headerParams.get("Authorization").get(2)); - } -} diff --git a/CI/samples.ci/client/petstore/java/test-manual/resttemplate/model/EnumValueTest.java b/CI/samples.ci/client/petstore/java/test-manual/resttemplate/model/EnumValueTest.java deleted file mode 100644 index 47bfe940d3..0000000000 --- a/CI/samples.ci/client/petstore/java/test-manual/resttemplate/model/EnumValueTest.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.openapitools.client.model; - -import org.junit.Test; - -import com.fasterxml.jackson.databind.ObjectMapper; -import com.fasterxml.jackson.databind.ObjectWriter; -import com.fasterxml.jackson.databind.SerializationFeature; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -public class EnumValueTest { - - @Test - public void testEnumClass() { - assertEquals(EnumClass._ABC.toString(), "_abc"); - assertEquals(EnumClass._EFG.toString(), "-efg"); - assertEquals(EnumClass._XYZ_.toString(), "(xyz)"); - } - - @Test - public void testEnumTest() { - // test enum value - EnumTest enumTest = new EnumTest(); - enumTest.setEnumString(EnumTest.EnumStringEnum.LOWER); - enumTest.setEnumInteger(EnumTest.EnumIntegerEnum.NUMBER_1); - enumTest.setEnumNumber(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1); - - assertEquals(EnumTest.EnumStringEnum.UPPER.toString(), "UPPER"); - assertEquals(EnumTest.EnumStringEnum.UPPER.getValue(), "UPPER"); - assertEquals(EnumTest.EnumStringEnum.LOWER.toString(), "lower"); - assertEquals(EnumTest.EnumStringEnum.LOWER.getValue(), "lower"); - - assertEquals(EnumTest.EnumIntegerEnum.NUMBER_1.toString(), "1"); - assertTrue(EnumTest.EnumIntegerEnum.NUMBER_1.getValue() == 1); - assertEquals(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.toString(), "-1"); - assertTrue(EnumTest.EnumIntegerEnum.NUMBER_MINUS_1.getValue() == -1); - - assertEquals(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.toString(), "1.1"); - assertTrue(EnumTest.EnumNumberEnum.NUMBER_1_DOT_1.getValue() == 1.1); - assertEquals(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.toString(), "-1.2"); - assertTrue(EnumTest.EnumNumberEnum.NUMBER_MINUS_1_DOT_2.getValue() == -1.2); - - try { - // test serialization (object => json) - ObjectMapper mapper = new ObjectMapper(); - mapper.enable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING); - ObjectWriter ow = mapper.writer(); - String json = ow.writeValueAsString(enumTest); - assertEquals(json, "{\"enum_string\":\"lower\",\"enum_string_required\":null,\"enum_integer\":1,\"enum_number\":1.1,\"outerEnum\":null}"); - - // test deserialization (json => object) - EnumTest fromString = mapper.readValue(json, EnumTest.class); - assertEquals(fromString.getEnumString().toString(), "lower"); - assertEquals(fromString.getEnumInteger().toString(), "1"); - assertEquals(fromString.getEnumNumber().toString(), "1.1"); - - } catch (Exception e) { - fail("Exception thrown during serialization/deserialzation of JSON: " + e.getMessage()); - } - } -} diff --git a/CI/samples.ci/client/petstore/kotlin-string/pom.xml b/CI/samples.ci/client/petstore/kotlin-string/pom.xml deleted file mode 100644 index a8d5f88f25..0000000000 --- a/CI/samples.ci/client/petstore/kotlin-string/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - org.openapitools - KotlinPetstoreStringTests - pom - 1.0-SNAPSHOT - kotlin-string - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - bundle-test - integration-test - - exec - - - gradle - - test - - - - - - - - diff --git a/CI/samples.ci/client/petstore/kotlin-threetenbp/pom.xml b/CI/samples.ci/client/petstore/kotlin-threetenbp/pom.xml deleted file mode 100644 index 7a67038888..0000000000 --- a/CI/samples.ci/client/petstore/kotlin-threetenbp/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - org.openapitools - KotlinPetstoreThreetenbpTests - pom - 1.0-SNAPSHOT - kotlin-threetenbp - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - bundle-test - integration-test - - exec - - - gradle - - test - - - - - - - - diff --git a/CI/samples.ci/client/petstore/typescript-fetch/builds/default/pom.xml b/CI/samples.ci/client/petstore/typescript-fetch/builds/default/pom.xml deleted file mode 100644 index b40b83a0c7..0000000000 --- a/CI/samples.ci/client/petstore/typescript-fetch/builds/default/pom.xml +++ /dev/null @@ -1,26 +0,0 @@ - - 4.0.0 - org.openapitools - TypeScriptAngularBuildPestoreClientTests - pom - 1.0-SNAPSHOT - TS Fetch Default Petstore Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - - diff --git a/CI/samples.ci/client/petstore/typescript-fetch/builds/es6-target/pom.xml b/CI/samples.ci/client/petstore/typescript-fetch/builds/es6-target/pom.xml deleted file mode 100644 index db6dfdfeb6..0000000000 --- a/CI/samples.ci/client/petstore/typescript-fetch/builds/es6-target/pom.xml +++ /dev/null @@ -1,59 +0,0 @@ - - 4.0.0 - org.openapitools - TypeScriptAngularBuildES6PestoreClientTests - pom - 1.0-SNAPSHOT - TS Fetch ES6 Petstore Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - npm-install - integration-test - - exec - - - npm - - install - - - - - npm-test - integration-test - - exec - - - npm - - test - - - - - - - - diff --git a/CI/samples.ci/client/petstore/typescript-fetch/builds/multiple-parameters/pom.xml b/CI/samples.ci/client/petstore/typescript-fetch/builds/multiple-parameters/pom.xml deleted file mode 100644 index a6fc39c4f0..0000000000 --- a/CI/samples.ci/client/petstore/typescript-fetch/builds/multiple-parameters/pom.xml +++ /dev/null @@ -1,26 +0,0 @@ - - 4.0.0 - org.openapitools - TypeScriptAngularBuildPestoreClientTests - pom - 1.0-SNAPSHOT - TS Fetch Multiple Parameters Petstore Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - - diff --git a/CI/samples.ci/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/pom.xml b/CI/samples.ci/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/pom.xml deleted file mode 100644 index 35c073c7dc..0000000000 --- a/CI/samples.ci/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ - - 4.0.0 - org.openapitools - TypeScriptFetchBuildPrefixParameterInterfacesPestoreClientTests - pom - 1.0-SNAPSHOT - TS Fetch Petstore Client (with namespacing for parameter interfaces) - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - npm-install - integration-test - - exec - - - npm - - install - - - - - npm-build - integration-test - - exec - - - npm - - run - build - - - - - npm-test - integration-test - - exec - - - npm - - test - - - - - - - - diff --git a/CI/samples.ci/client/petstore/typescript-fetch/builds/with-npm-version/pom.xml b/CI/samples.ci/client/petstore/typescript-fetch/builds/with-npm-version/pom.xml deleted file mode 100644 index 339fe76651..0000000000 --- a/CI/samples.ci/client/petstore/typescript-fetch/builds/with-npm-version/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ - - 4.0.0 - org.openapitools - TypeScriptAngularBuildWithNPMVersionPestoreClientTests - pom - 1.0-SNAPSHOT - TS Fetch Petstore Client (with npm) - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - npm-install - integration-test - - exec - - - npm - - install - - - - - npm-build - integration-test - - exec - - - npm - - run - build - - - - - npm-test - integration-test - - exec - - - npm - - test - - - - - - - - diff --git a/CI/samples.ci/client/petstore/typescript-fetch/tests/default/pom.xml b/CI/samples.ci/client/petstore/typescript-fetch/tests/default/pom.xml deleted file mode 100644 index 92063ea7bc..0000000000 --- a/CI/samples.ci/client/petstore/typescript-fetch/tests/default/pom.xml +++ /dev/null @@ -1,59 +0,0 @@ - - 4.0.0 - org.openapitools - TypeScriptFetchPestoreClientTests - pom - 1.0-SNAPSHOT - TS Fetch Petstore Test Client - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - npm-install - pre-integration-test - - exec - - - npm - - install - - - - - npm-test - integration-test - - exec - - - npm - - test - - - - - - - - diff --git a/CI/samples.ci/server/petstore/java-play-framework-api-package-override/pom.xml b/CI/samples.ci/server/petstore/java-play-framework-api-package-override/pom.xml deleted file mode 100644 index 640424c4ac..0000000000 --- a/CI/samples.ci/server/petstore/java-play-framework-api-package-override/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - org.openapitools - PlayServerTests-api-package-override - pom - 1.0-SNAPSHOT - java-play-framework-api-package-override Project - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.6.0 - - - Play Test - integration-test - - exec - - - sbt - - test - - - - - - - - diff --git a/CI/samples.ci/server/petstore/java-play-framework-controller-only/pom.xml b/CI/samples.ci/server/petstore/java-play-framework-controller-only/pom.xml deleted file mode 100644 index ecc1280f2d..0000000000 --- a/CI/samples.ci/server/petstore/java-play-framework-controller-only/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - org.openapitools - PlayServerTests-controller-only - pom - 1.0-SNAPSHOT - java-play-framework-controller-only Project - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.6.0 - - - Play Test - integration-test - - exec - - - sbt - - test - - - - - - - - diff --git a/CI/samples.ci/server/petstore/java-play-framework-fake-endpoints/pom.xml b/CI/samples.ci/server/petstore/java-play-framework-fake-endpoints/pom.xml deleted file mode 100644 index 46597a4a02..0000000000 --- a/CI/samples.ci/server/petstore/java-play-framework-fake-endpoints/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - org.openapitools - PlayServerTests-fake-endpoints - pom - 1.0-SNAPSHOT - java-play-framework-fake-endpoints Project - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.6.0 - - - Play Test - integration-test - - exec - - - sbt - - test - - - - - - - - diff --git a/CI/samples.ci/server/petstore/java-play-framework-no-bean-validation/pom.xml b/CI/samples.ci/server/petstore/java-play-framework-no-bean-validation/pom.xml deleted file mode 100644 index 495a44e9bc..0000000000 --- a/CI/samples.ci/server/petstore/java-play-framework-no-bean-validation/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - org.openapitools - PlayServerTests-no-bean-validation - pom - 1.0-SNAPSHOT - java-play-framework-no-bean-validation Project - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.6.0 - - - Play Test - integration-test - - exec - - - sbt - - test - - - - - - - - diff --git a/CI/samples.ci/server/petstore/java-play-framework-no-exception-handling/pom.xml b/CI/samples.ci/server/petstore/java-play-framework-no-exception-handling/pom.xml deleted file mode 100644 index 1943f31657..0000000000 --- a/CI/samples.ci/server/petstore/java-play-framework-no-exception-handling/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - org.openapitools - PlayServerTests-no-exception-handling - pom - 1.0-SNAPSHOT - java-play-framework-no-exception-handling Project - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.6.0 - - - Play Test - integration-test - - exec - - - sbt - - test - - - - - - - - diff --git a/CI/samples.ci/server/petstore/java-play-framework-no-interface/pom.xml b/CI/samples.ci/server/petstore/java-play-framework-no-interface/pom.xml deleted file mode 100644 index 29b0d52b87..0000000000 --- a/CI/samples.ci/server/petstore/java-play-framework-no-interface/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - org.openapitools - PlayServerTests-no-interface - pom - 1.0-SNAPSHOT - java-play-framework-no-interface Project - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.6.0 - - - Play Test - integration-test - - exec - - - sbt - - test - - - - - - - - diff --git a/CI/samples.ci/server/petstore/java-play-framework-no-swagger-ui/pom.xml b/CI/samples.ci/server/petstore/java-play-framework-no-swagger-ui/pom.xml deleted file mode 100644 index d088603f85..0000000000 --- a/CI/samples.ci/server/petstore/java-play-framework-no-swagger-ui/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - org.openapitools - PlayServerTests-no-swagger-ui - pom - 1.0-SNAPSHOT - java-play-framework-no-swagger-ui Project - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.6.0 - - - Play Test - integration-test - - exec - - - sbt - - test - - - - - - - - diff --git a/CI/samples.ci/server/petstore/java-play-framework-no-wrap-calls/pom.xml b/CI/samples.ci/server/petstore/java-play-framework-no-wrap-calls/pom.xml deleted file mode 100644 index 258bba0587..0000000000 --- a/CI/samples.ci/server/petstore/java-play-framework-no-wrap-calls/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - org.openapitools - PlayServerTests-no-wrap-calls - pom - 1.0-SNAPSHOT - java-play-framework-no-wrap-calls Project - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.6.0 - - - Play Test - integration-test - - exec - - - sbt - - test - - - - - - - - diff --git a/CI/samples.ci/server/petstore/java-play-framework/pom.xml b/CI/samples.ci/server/petstore/java-play-framework/pom.xml deleted file mode 100644 index 91bbd25815..0000000000 --- a/CI/samples.ci/server/petstore/java-play-framework/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - org.openapitools - PlayServerTests - pom - 1.0-SNAPSHOT - java-play-framework Project - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.6.0 - - - Play Test - integration-test - - exec - - - sbt - - test - - - - - - - - diff --git a/CI/samples.ci/server/petstore/kotlin-server/ktor/pom.xml b/CI/samples.ci/server/petstore/kotlin-server/ktor/pom.xml deleted file mode 100644 index 3123ad353a..0000000000 --- a/CI/samples.ci/server/petstore/kotlin-server/ktor/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - org.openapitools - KotlinPetstoreKtorTests - pom - 1.0-SNAPSHOT - kotlin-server-ktor - - - - maven-dependency-plugin - - - package - - copy-dependencies - - - ${project.build.directory} - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - bundle-test - integration-test - - exec - - - gradle - - test - - - - - - - - diff --git a/CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/obj/Debug/Org.OpenAPITools.Test.csproj.CoreCompileInputs.cache b/CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/obj/Debug/Org.OpenAPITools.Test.csproj.CoreCompileInputs.cache deleted file mode 100644 index 4096123585..0000000000 --- a/CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/obj/Debug/Org.OpenAPITools.Test.csproj.CoreCompileInputs.cache +++ /dev/null @@ -1 +0,0 @@ -c2fcc2ae9693a8e8d02b25e286844aad88188fcb diff --git a/CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/obj/Debug/Org.OpenAPITools.Test.csprojResolveAssemblyReference.cache b/CI/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/obj/Debug/Org.OpenAPITools.Test.csprojResolveAssemblyReference.cache deleted file mode 100644 index 76cdea6cfa7346d02b1e3bf1f9538be1f65cacde..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5893 zcmb_ge{38_6}~y!=iBw!=cWl58XKFYp{<=eU+r_8rY1NhPORFA>njPRaW3n-IeX*1 zU3YgcsUtxulB%>+Buz>}B1D6#{-kv!Xpjh0YKTGYpOhBS3Mv7uYDxrDqCylRc;9%} zx94us)Z9k01#w&vl&n5JfK<dLeqH0rX^UhEs8Z^D`OhR zs-+4Nl@OO5T1^AwK|{&*D;e7`s~vm7eMWvtF}Ya}&^{x}hfQOzn&oB~e@LnOc_mq7 zg|;hNfm?whswV8mHQ-{c@>%o1hwv}l*1aKuRmoS8lqw;rNYtYx(;Etr$i@fN zF;g+8LEl(FGK5U zh~*F~AU*-{Nr(oBPm!p?jMn0b_9owXlSC?P?RS$R@ewek;bB)^rrxnu(~_RgxIJ)m zNl&xe1Mipgw75Okl9Ha!x;@yZlAddwp2#X{Y;{gvX{qc)oxGw-xpu9R%p|)K>pD7l zd-u93xbb6c1WrVqVtF?ytXL`ARQ2(QYNgctl*X~kt0okSDqMzJmSOgqnF-aVs!C;i zK<_W09$=89=JN$nU?V2aD^pWE+ix2A3Y6x`Cdbwho^uLv$=P6xJX@pj_H-!SuPNhJQ~(v{ zv+7_VSW!_yZ!j3HbA0J6BDvsNJ*SQr%=s^Sr|!`A#zHM9S?khf-EyT|&e}?hyVjX} zi83WD53QqpX>bQj@*lF^v7pqsZ*1q`^`! zva{5{5~0WprAQENrbhkZawKiRpm~x3YO){GMAv)lj7O2#^Q0}1{D_ny35t*)*-DM5 zv-xfzlC~8&hQaZi2bRrv6q!Bi<#?uq1La3>e2E%0o&zRrFXHb2{*xX^_Jl`~+2daP z$4c-~cm)1V4?c>IG+M;p1^n-OAlYe;BC|(GTkz5MNGbXVB}d?A09W*plr6$@z@PFU zvXdS~X5aC`pD2Mxu@Ufls1bGxjx<>W*8qOZgU60~6q!Bb1wT>(j-)KW@1jO%e(jQ3 zgth?vpa+e8)1%1j0Wb9ZCD14^0{U(=9JgG)$Vk&g=KWy4*F(k*c@&u)^fG_l%N#`( z!u10msN%u@5#gysQd*Rw(HBY&DSHf)epDSl;!Y{0NBCY9U-_6CrpJYWjwgyh_9bG7 zYmosl&htbOmZ#|r23FB}?g<1QCMATGl0K5^O$3OA(ZA|neXwJ8=Jmfn8awoKbmn61 zpXV;_xp4Tte^>0)4i26?+VsQq@0@!5wcnll{i#>Fu5Jk)sWET)*FE1pF#Csn^@o31 zy>HtMb2rr;eYfhuTXQWhKK8e{_p&<&BgfAD;N zQ~0H(Ad3815LCV_hz|cL2o~QdIM%1>{m4x}^PeN{1P_eg*R=2E!*AZ-{Ziwr!L$4) z&5gV7`26wNqrB-G-#xcs`HH`s+3?I&iJ6*Tcl_e7yIaQBoM?DA@#M@4wWq7&*ZuaZ zXN{Mm7w`Dit8XOV8eI3_roQUAKdnEsdU?;x%kLjQXq \(.*\)$'` - 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" -model="modules/openapi-generator/src/test/resources/2_0/petstore.yaml" -ags="generate --template-dir modules/openapi-generator/src/main/resources/Ada -g ada $@" -ags="$ags -i $model -t modules/openapi-generator/src/main/resources/Ada -o samples/client/petstore/ada" -ags="$ags --additional-properties projectName=Petstore --model-package Samples.Petstore" - -java $JAVA_OPTS -jar $executable $ags -rm -rf samples/client/petstore/ada/src/server diff --git a/bin/android-petstore-all.sh b/bin/android-petstore-all.sh deleted file mode 100755 index 08a03263a8..0000000000 --- a/bin/android-petstore-all.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -./bin/android-petstore-httpclient.sh -./bin/android-petstore-volley.sh - diff --git a/bin/android-petstore-httpclient.sh b/bin/android-petstore-httpclient.sh deleted file mode 100755 index d0982cec14..0000000000 --- a/bin/android-petstore-httpclient.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/android -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g android --additional-properties library=httpclient -o samples/client/petstore/android/httpclient $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/android-petstore-volley.json b/bin/android-petstore-volley.json deleted file mode 100644 index 7366f4817c..0000000000 --- a/bin/android-petstore-volley.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "library": "volley", - "artifactId": "petstore-android-volley" -} diff --git a/bin/android-petstore-volley.sh b/bin/android-petstore-volley.sh deleted file mode 100755 index af7edc7c39..0000000000 --- a/bin/android-petstore-volley.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g android -c bin/android-petstore-volley.json -o samples/client/petstore/android/volley $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/apache2-petstore-config.sh b/bin/apache2-petstore-config.sh deleted file mode 100755 index ee7f1e05cc..0000000000 --- a/bin/apache2-petstore-config.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -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 -g apache2 -t modules/openapi-generator/src/main/resources/apache2/ -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -o samples/config/petstore/apache2 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/apex-petstore.sh b/bin/apex-petstore.sh deleted file mode 100755 index bdafe9e582..0000000000 --- a/bin/apex-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/apex -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g apex -o samples/client/petstore/apex --global-property skipFormModel=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/asciidoc-documentation-petstore.sh b/bin/asciidoc-documentation-petstore.sh deleted file mode 100755 index 2f72f2eeb0..0000000000 --- a/bin/asciidoc-documentation-petstore.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" - -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/asciidoc-documentation --additional-properties=specDir=modules/openapi-generator/src/main/resources/asciidoc-documentation,snippetDir=. -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g asciidoc -o samples/documentation/asciidoc $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/aspnetcore-petstore-server-3.0.sh b/bin/aspnetcore-petstore-server-3.0.sh deleted file mode 100755 index 1da77bd3e9..0000000000 --- a/bin/aspnetcore-petstore-server-3.0.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -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 -g aspnetcore -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/aspnetcore/3.0/ -o samples/server/petstore/aspnetcore-3.0 --additional-properties packageGuid={3C799344-F285-4669-8FD5-7ED9B795D5C5} --additional-properties aspnetCoreVersion=3.0 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/aspnetcore-petstore-server-3.1.sh b/bin/aspnetcore-petstore-server-3.1.sh deleted file mode 100755 index 15310c75b2..0000000000 --- a/bin/aspnetcore-petstore-server-3.1.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -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 -g aspnetcore -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/aspnetcore/3.0/ -o samples/server/petstore/aspnetcore-3.1 --additional-properties packageGuid={3C799344-F285-4669-8FD5-7ED9B795D5C5} --additional-properties aspnetCoreVersion=3.1 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/aspnetcore-petstore-server.sh b/bin/aspnetcore-petstore-server.sh deleted file mode 100755 index ec6aa29eed..0000000000 --- a/bin/aspnetcore-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -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 -g aspnetcore -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/aspnetcore/2.1/ -o samples/server/petstore/aspnetcore --additional-properties packageGuid={3C799344-F285-4669-8FD5-7ED9B795D5C5} $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/aspnetcore3-petstore-server.sh b/bin/aspnetcore3-petstore-server.sh deleted file mode 100644 index 56c3be609c..0000000000 --- a/bin/aspnetcore3-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -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 -g aspnetcore -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/aspnetcore/3.0/ -o samples/server/petstore/aspnetcore3 --additional-properties packageGuid={3C799344-F285-4669-8FD5-7ED9B795D5C5} --additional-properties aspnetCoreVersion=3.0 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/avro-petstore.sh b/bin/avro-petstore.sh deleted file mode 100755 index 7b8045fcf8..0000000000 --- a/bin/avro-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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/avro-schema -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g avro-schema -o samples/openapi3/schema/petstore/avro-schema $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/bash-petstore.sh b/bin/bash-petstore.sh deleted file mode 100755 index d5c4766731..0000000000 --- a/bin/bash-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -args="generate -t modules/openapi-generator/src/main/resources/bash -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g bash -o samples/client/petstore/bash -c modules/openapi-generator/src/test/resources/2_0/bash-config.json --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $args diff --git a/bin/c-petstore.sh b/bin/c-petstore.sh deleted file mode 100755 index 19a69b8d0e..0000000000 --- a/bin/c-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/C-libcurl -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g c -o samples/client/petstore/c $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/ci/apex-petstore.json b/bin/ci/apex-petstore.json deleted file mode 100644 index 73773132df..0000000000 --- a/bin/ci/apex-petstore.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "generatorName": "apex", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/apex", - "templateDir": "modules/openapi-generator/src/main/resources/apex" -} \ No newline at end of file diff --git a/bin/ci/csharp-netcore-petstore-1.json b/bin/ci/csharp-netcore-petstore-1.json deleted file mode 100644 index c2e1797c85..0000000000 --- a/bin/ci/csharp-netcore-petstore-1.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "generatorName": "csharp-netcore", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/csharp-netcore/OpenAPIClientCore", - "templateDir": "modules/openapi-generator/src/main/resources/csharp-netcore/", - "additionalProperties": { - "packageGuid": "{321C8C3F-0156-40C1-AE42-D59761FB9B6C}", - "useCompareNetObjects": true, - "targetFramework": "netcoreapp2.0" - } -} \ No newline at end of file diff --git a/bin/ci/csharp-netcore-petstore.json b/bin/ci/csharp-netcore-petstore.json deleted file mode 100644 index 506d74d1ab..0000000000 --- a/bin/ci/csharp-netcore-petstore.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "generatorName": "csharp-netcore", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/csharp-netcore/OpenAPIClient", - "templateDir": "modules/openapi-generator/src/main/resources/csharp-netcore/", - "additionalProperties": { - "packageGuid": "{321C8C3F-0156-40C1-AE42-D59761FB9B6C}", - "useCompareNetObjects": true - } -} \ No newline at end of file diff --git a/bin/ci/csharp-petstore.json b/bin/ci/csharp-petstore.json deleted file mode 100644 index fe5a9104e1..0000000000 --- a/bin/ci/csharp-petstore.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "generatorName": "csharp", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/csharp/OpenAPIClient", - "additionalProperties": { - "packageGuid": "{321C8C3F-0156-40C1-AE42-D59761FB9B6C}" - } -} \ No newline at end of file diff --git a/bin/ci/dart-flutter-petstore.json b/bin/ci/dart-flutter-petstore.json deleted file mode 100644 index 81213f1c10..0000000000 --- a/bin/ci/dart-flutter-petstore.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "generatorName": "dart", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/dart/flutter_petstore/openapi", - "templateDir": "modules/openapi-generator/src/main/resources/dart", - "additionalProperties": { - "hideGenerationTimestamp": true, - "browserClient": false, - "supportDart2": false - } -} \ No newline at end of file diff --git a/bin/ci/dart-jaguar-petstore-1.json b/bin/ci/dart-jaguar-petstore-1.json deleted file mode 100644 index 2226b49c6f..0000000000 --- a/bin/ci/dart-jaguar-petstore-1.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "generatorName": "dart-jaguar", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/dart-jaguar/flutter_petstore/openapi", - "templateDir": "modules/openapi-generator/src/main/resources/dart-jaguar", - "additionalProperties": { - "hideGenerationTimestamp": true, - "pubName": "openapi" - } -} \ No newline at end of file diff --git a/bin/ci/dart-jaguar-petstore-2.json b/bin/ci/dart-jaguar-petstore-2.json deleted file mode 100644 index 2eed934b1c..0000000000 --- a/bin/ci/dart-jaguar-petstore-2.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "generatorName": "dart-jaguar", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml", - "outputDir": "samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi", - "templateDir": "modules/openapi-generator/src/main/resources/dart-jaguar", - "additionalProperties": { - "serialization": "proto", - "hideGenerationTimestamp": true, - "pubName": "openapi" - } -} \ No newline at end of file diff --git a/bin/ci/dart-jaguar-petstore-3.json b/bin/ci/dart-jaguar-petstore-3.json deleted file mode 100644 index d41ef5d40c..0000000000 --- a/bin/ci/dart-jaguar-petstore-3.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "generatorName": "dart-jaguar", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml", - "outputDir": "samples/client/petstore/dart-jaguar/openapi_proto", - "templateDir": "modules/openapi-generator/src/main/resources/dart-jaguar", - "additionalProperties": { - "serialization": "proto", - "hideGenerationTimestamp": true, - "pubName": "openapi" - } -} \ No newline at end of file diff --git a/bin/ci/dart-jaguar-petstore.json b/bin/ci/dart-jaguar-petstore.json deleted file mode 100644 index 761296fa28..0000000000 --- a/bin/ci/dart-jaguar-petstore.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "generatorName": "dart-jaguar", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/dart-jaguar/openapi", - "templateDir": "modules/openapi-generator/src/main/resources/dart-jaguar", - "additionalProperties": { - "hideGenerationTimestamp": true, - "pubName": "openapi" - } -} \ No newline at end of file diff --git a/bin/ci/dart-petstore-flutter.json b/bin/ci/dart-petstore-flutter.json deleted file mode 100644 index 81213f1c10..0000000000 --- a/bin/ci/dart-petstore-flutter.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "generatorName": "dart", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/dart/flutter_petstore/openapi", - "templateDir": "modules/openapi-generator/src/main/resources/dart", - "additionalProperties": { - "hideGenerationTimestamp": true, - "browserClient": false, - "supportDart2": false - } -} \ No newline at end of file diff --git a/bin/ci/dart-petstore-openapi-browser-client.json b/bin/ci/dart-petstore-openapi-browser-client.json deleted file mode 100644 index c26293f2f4..0000000000 --- a/bin/ci/dart-petstore-openapi-browser-client.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "generatorName": "dart", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/dart/openapi-browser-client", - "templateDir": "modules/openapi-generator/src/main/resources/dart", - "additionalProperties": { - "hideGenerationTimestamp": true, - "browserClient": true, - "supportDart2": false - } -} \ No newline at end of file diff --git a/bin/ci/dart-petstore.json b/bin/ci/dart-petstore.json deleted file mode 100644 index 3f3691a82e..0000000000 --- a/bin/ci/dart-petstore.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "generatorName": "dart", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/dart/openapi", - "templateDir": "modules/openapi-generator/src/main/resources/dart", - "additionalProperties": { - "hideGenerationTimestamp": true, - "browserClient": false, - "supportDart2": false - } -} \ No newline at end of file diff --git a/bin/ci/dart2-petstore.json b/bin/ci/dart2-petstore.json deleted file mode 100644 index c12549e213..0000000000 --- a/bin/ci/dart2-petstore.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "generatorName": "dart", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/dart2/openapi", - "templateDir": "modules/openapi-generator/src/main/resources/dart2", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/elixir-petstore.json b/bin/ci/elixir-petstore.json deleted file mode 100644 index e8ce9b6b11..0000000000 --- a/bin/ci/elixir-petstore.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "generatorName": "elixir", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/elixir/", - "templateDir": "modules/openapi-generator/src/main/resources/elixir", - "additionalProperties": { - "invokerPackage": "OpenapiPetstore" - } -} \ No newline at end of file diff --git a/bin/ci/go-gin-petstore-server.json b/bin/ci/go-gin-petstore-server.json deleted file mode 100644 index 9e55159bbc..0000000000 --- a/bin/ci/go-gin-petstore-server.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "generatorName": "go-gin-server", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/go-gin-api-server", - "templateDir": "modules/openapi-generator/src/main/resources/go-gin-server", - "additionalProperties": { - "packageName": "petstoreserver", - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/go-petstore-withxml.json b/bin/ci/go-petstore-withxml.json deleted file mode 100644 index 6fdc619534..0000000000 --- a/bin/ci/go-petstore-withxml.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "generatorName": "go", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/go/go-petstore-withXml", - "templateDir": "modules/openapi-generator/src/main/resources/go", - "additionalProperties": { - "packageName": "petstore", - "withXml": true, - "withGoCodegenComment": true - } -} \ No newline at end of file diff --git a/bin/ci/go-petstore.json b/bin/ci/go-petstore.json deleted file mode 100644 index ed3ae37ab2..0000000000 --- a/bin/ci/go-petstore.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "generatorName": "go", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/go/go-petstore", - "templateDir": "modules/openapi-generator/src/main/resources/go", - "additionalProperties": { - "packageName": "petstore" - } -} \ No newline at end of file diff --git a/bin/ci/groovy-petstore.json b/bin/ci/groovy-petstore.json deleted file mode 100644 index 6ed0f5f8c9..0000000000 --- a/bin/ci/groovy-petstore.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "generatorName": "groovy", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/groovy", - "templateDir": "modules/openapi-generator/src/main/resources/Groovy/", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/haskell-http-client-petstore.json b/bin/ci/haskell-http-client-petstore.json deleted file mode 100644 index 49b28a41e5..0000000000 --- a/bin/ci/haskell-http-client-petstore.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "generatorName": "haskell-http-client", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/haskell-http-client", - "templateDir": "modules/openapi-generator/src/main/resources/haskell-http-client" -} \ No newline at end of file diff --git a/bin/ci/java-feign.json b/bin/ci/java-feign.json deleted file mode 100644 index 8d2c23fa7e..0000000000 --- a/bin/ci/java-feign.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "!include": "bin/java-petstore-feign-9x.json", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/feign", - "templateDir": "modules/openapi-generator/src/main/resources/Java", - "additionalProperties": { - "hideGenerationTimestamp": true, - "booleanGetterPrefix": "is", - "additionalModelTypeAnnotations": "@javax.annotation.concurrent.Immutable" - } -} \ No newline at end of file diff --git a/bin/ci/java-feign10x.json b/bin/ci/java-feign10x.json deleted file mode 100644 index 50574a9542..0000000000 --- a/bin/ci/java-feign10x.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "!include": "bin/java-petstore-feign-10x.json", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/feign10x", - "templateDir": "modules/openapi-generator/src/main/resources/Java", - "additionalProperties": { - "hideGenerationTimestamp": true, - "booleanGetterPrefix": "is" - } -} \ No newline at end of file diff --git a/bin/ci/java-google-api-client.json b/bin/ci/java-google-api-client.json deleted file mode 100644 index e30057f3c9..0000000000 --- a/bin/ci/java-google-api-client.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "!include": "bin/java-petstore-google-api-client.json", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/google-api-client", - "templateDir": "modules/openapi-generator/src/main/resources/Java", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-cxf-annotated-base-path.json b/bin/ci/java-jaxrs-cxf-annotated-base-path.json deleted file mode 100644 index 5c914be89c..0000000000 --- a/bin/ci/java-jaxrs-cxf-annotated-base-path.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "artifactId": "cxf-annotated-basepath", - "generatorName": "jaxrs-cxf", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/jaxrs-cxf-annotated-base-path", - "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/cxf", - "additionalProperties": { - "hideGenerationTimestamp": true, - "useAnnotatedBasePath": true, - "serverPort": "8082" - } -} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-cxf-cdi.json b/bin/ci/java-jaxrs-cxf-cdi.json deleted file mode 100644 index 2ce07d2215..0000000000 --- a/bin/ci/java-jaxrs-cxf-cdi.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "generatorName": "jaxrs-cxf-cdi", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/jaxrs-cxf-cdi", - "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-cxf-non-spring-app.json b/bin/ci/java-jaxrs-cxf-non-spring-app.json deleted file mode 100644 index d7864551b2..0000000000 --- a/bin/ci/java-jaxrs-cxf-non-spring-app.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "artifactId": "cxf-server-non-spring", - "generatorName": "jaxrs-cxf", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/jaxrs-cxf-non-spring-app", - "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/cxf", - "additionalProperties": { - "hideGenerationTimestamp": true, - "generateNonSpringApplication": true, - "serverPort": "8082" - } -} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-cxf.json b/bin/ci/java-jaxrs-cxf.json deleted file mode 100644 index 3d80df7a58..0000000000 --- a/bin/ci/java-jaxrs-cxf.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "generatorName": "jaxrs-cxf", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/jaxrs-cxf", - "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/cxf", - "additionalProperties": { - "hideGenerationTimestamp": true, - "serverPort": "8082" - } -} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-datelib-j8.json b/bin/ci/java-jaxrs-datelib-j8.json deleted file mode 100644 index f97c7cfa71..0000000000 --- a/bin/ci/java-jaxrs-datelib-j8.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "!include": "bin/jaxrs-datelib-j8.json", - "generatorName": "jaxrs-jersey", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/jaxrs-datelib-j8/", - "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/", - "additionalProperties": { - "hideGenerationTimestamp": true, - "serverPort": "8082" - } -} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-jersey.json b/bin/ci/java-jaxrs-jersey.json deleted file mode 100644 index 5065fb2c38..0000000000 --- a/bin/ci/java-jaxrs-jersey.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "artifactId": "openapiv3-jaxrs-jersey-petstore-server", - "generatorName": "jaxrs-jersey", - "inputSpec": "modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/jaxrs-jersey", - "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-jersey1-useTags.json b/bin/ci/java-jaxrs-jersey1-useTags.json deleted file mode 100644 index 2b1696d092..0000000000 --- a/bin/ci/java-jaxrs-jersey1-useTags.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "artifactId": "jaxrs-jersey1-useTags", - "generatorName": "jaxrs-jersey", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "library": "jersey1", - "outputDir": "samples/server/petstore/jaxrs/jersey1-useTags", - "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS", - "additionalProperties": { - "hideGenerationTimestamp": true, - "serverPort": "8082", - "useTags": true - } -} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-jersey1.json b/bin/ci/java-jaxrs-jersey1.json deleted file mode 100644 index a2dde704e7..0000000000 --- a/bin/ci/java-jaxrs-jersey1.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "artifactId": "jaxrs-jersey1-server", - "generatorName": "jaxrs-jersey", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "library": "jersey1", - "outputDir": "samples/server/petstore/jaxrs/jersey1", - "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS", - "additionalProperties": { - "hideGenerationTimestamp": true, - "serverPort": "8082" - } -} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-jersey2-useTags.json b/bin/ci/java-jaxrs-jersey2-useTags.json deleted file mode 100644 index 6c8aa420d3..0000000000 --- a/bin/ci/java-jaxrs-jersey2-useTags.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "artifactId": "jaxrs-jersey2-useTags", - "generatorName": "jaxrs-jersey", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/jaxrs/jersey2-useTags", - "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS", - "additionalProperties": { - "hideGenerationTimestamp": true, - "serverPort": "8082", - "useTags": true - } -} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-jersey2.json b/bin/ci/java-jaxrs-jersey2.json deleted file mode 100644 index 7c88d46e05..0000000000 --- a/bin/ci/java-jaxrs-jersey2.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "artifactId": "jaxrs-jersey-petstore-server", - "generatorName": "jaxrs-jersey", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/jaxrs/jersey2", - "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS", - "additionalProperties": { - "hideGenerationTimestamp": true, - "serverPort": "8082" - } -} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-resteasy-eap-java8-server.json b/bin/ci/java-jaxrs-resteasy-eap-java8-server.json deleted file mode 100644 index 2a7af42d82..0000000000 --- a/bin/ci/java-jaxrs-resteasy-eap-java8-server.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "!include": "bin/jaxrs-resteasy-eap-java8-petstore-server.json", - "artifactId": "jaxrs-resteasy-eap-java8-server", - "generatorName": "jaxrs-resteasy-eap", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/jaxrs-resteasy/eap-java8", - "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-resteasy-eap-joda-server.json b/bin/ci/java-jaxrs-resteasy-eap-joda-server.json deleted file mode 100644 index 242744045b..0000000000 --- a/bin/ci/java-jaxrs-resteasy-eap-joda-server.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "!include": "bin/jaxrs-resteasy-eap-joda-petstore-server.json", - "artifactId": "jaxrs-resteasy-eap-joda-server", - "generatorName": "jaxrs-resteasy-eap", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/jaxrs-resteasy/eap-joda", - "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-resteasy-eap.json b/bin/ci/java-jaxrs-resteasy-eap.json deleted file mode 100644 index 2ce98a184c..0000000000 --- a/bin/ci/java-jaxrs-resteasy-eap.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "generatorName": "jaxrs-resteasy-eap", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/jaxrs-resteasy/eap", - "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-resteasy-joda-server.json b/bin/ci/java-jaxrs-resteasy-joda-server.json deleted file mode 100644 index aa243b2b0d..0000000000 --- a/bin/ci/java-jaxrs-resteasy-joda-server.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "!include": "bin/jaxrs-resteasy-joda-petstore-server.json", - "artifactId": "jaxrs-resteasy-joda-server", - "generatorName": "jaxrs-resteasy", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/jaxrs-resteasy/joda", - "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-resteasy.json b/bin/ci/java-jaxrs-resteasy.json deleted file mode 100644 index baf1a65e86..0000000000 --- a/bin/ci/java-jaxrs-resteasy.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "generatorName": "jaxrs-resteasy", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/jaxrs-resteasy/default", - "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-spec-interface.json b/bin/ci/java-jaxrs-spec-interface.json deleted file mode 100644 index e588bfbacb..0000000000 --- a/bin/ci/java-jaxrs-spec-interface.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "artifactId": "jaxrs-spec-interface-petstore-server", - "generatorName": "jaxrs-spec", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/jaxrs-spec-interface", - "additionalProperties": { - "hideGenerationTimestamp": true, - "serializableModel": true, - "interfaceOnly": true - } -} \ No newline at end of file diff --git a/bin/ci/java-jaxrs-spec.json b/bin/ci/java-jaxrs-spec.json deleted file mode 100644 index b4ba832193..0000000000 --- a/bin/ci/java-jaxrs-spec.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "artifactId": "jaxrs-spec-petstore-server", - "generatorName": "jaxrs-spec", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/jaxrs-spec", - "additionalProperties": { - "hideGenerationTimestamp": true, - "serializableModel": true - } -} \ No newline at end of file diff --git a/bin/ci/java-jersey1.json b/bin/ci/java-jersey1.json deleted file mode 100644 index 2982da52b3..0000000000 --- a/bin/ci/java-jersey1.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "artifactId": "petstore-java-client-jersey1", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "library": "jersey1", - "outputDir": "samples/client/petstore/java/jersey1", - "templateDir": "modules/openapi-generator/src/main/resources/Java", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-jersey2-java6.json b/bin/ci/java-jersey2-java6.json deleted file mode 100644 index 1420161ffb..0000000000 --- a/bin/ci/java-jersey2-java6.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "!include": "bin/java-petstore-jersey2.json", - "artifactId": "petstore-jersey2-java6", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/jersey2-java6", - "additionalProperties": { - "hideGenerationTimestamp": true, - "supportJava6": true, - "booleanGetterPrefix": "is" - } -} \ No newline at end of file diff --git a/bin/ci/java-jersey2-java8.json b/bin/ci/java-jersey2-java8.json deleted file mode 100644 index c1843fb879..0000000000 --- a/bin/ci/java-jersey2-java8.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "!include": "bin/java8-petstore-jersey2.json", - "artifactId": "petstore-jersey2-java8", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/jersey2-java8", - "additionalProperties": { - "hideGenerationTimestamp": true, - "serverPort": "8082" - } -} \ No newline at end of file diff --git a/bin/ci/java-jersey2.json b/bin/ci/java-jersey2.json deleted file mode 100644 index e0ad2e3c28..0000000000 --- a/bin/ci/java-jersey2.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "!include": "bin/java-petstore-jersey2.json", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/jersey2", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-msf4j-petstore-server.json b/bin/ci/java-msf4j-petstore-server.json deleted file mode 100644 index 0389c62a24..0000000000 --- a/bin/ci/java-msf4j-petstore-server.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "generatorName": "java-msf4j", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/java-msf4j/", - "templateDir": "modules/openapi-generator/src/main/resources/java-msf4j-server", - "additionalProperties": { - "hideGenerationTimestamp": true, - "artifactId": "java-msf4j-server" - } -} \ No newline at end of file diff --git a/bin/ci/java-native.json b/bin/ci/java-native.json deleted file mode 100644 index 7d8c792e5b..0000000000 --- a/bin/ci/java-native.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "!include": "bin/java-petstore-native.json", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/native", - "templateDir": "modules/openapi-generator/src/main/resources/Java", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-okhttp-gson-parcelableModel.json b/bin/ci/java-okhttp-gson-parcelableModel.json deleted file mode 100644 index 332fa46a24..0000000000 --- a/bin/ci/java-okhttp-gson-parcelableModel.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "!include": "bin/java-petstore-okhttp-gson.json", - "artifactId": "petstore-okhttp-gson-parcelableModel", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/okhttp-gson-parcelableModel", - "templateDir": "modules/openapi-generator/src/main/resources/Java", - "additionalProperties": { - "hideGenerationTimestamp": true, - "parcelableModel": true - } -} \ No newline at end of file diff --git a/bin/ci/java-okhttp-gson.json b/bin/ci/java-okhttp-gson.json deleted file mode 100644 index cdba0e7128..0000000000 --- a/bin/ci/java-okhttp-gson.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "!include": "bin/java-petstore-okhttp-gson.json", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/okhttp-gson", - "templateDir": "modules/openapi-generator/src/main/resources/Java", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-petstore-feign-10x.json b/bin/ci/java-petstore-feign-10x.json deleted file mode 100644 index 5099400415..0000000000 --- a/bin/ci/java-petstore-feign-10x.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "templateDir": "modules/openapi-generator/src/main/resources/Java", - "outputDir": "samples/client/petstore/java/feign10x", - "additionalProperties": { - "hideGenerationTimestamp": true, - "booleanGetterPrefix": "is" - }, - "!include": "bin/java-petstore-feign-10x.json" -} \ No newline at end of file diff --git a/bin/ci/java-play-framework-api-package-override.json b/bin/ci/java-play-framework-api-package-override.json deleted file mode 100644 index 6570af2c8b..0000000000 --- a/bin/ci/java-play-framework-api-package-override.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "generatorName": "java-play-framework", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/java-play-framework-api-package-override", - "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", - "additionalProperties": { - "hideGenerationTimestamp": true, - "apiPackage": "com.puppies.store.apis" - } -} \ No newline at end of file diff --git a/bin/ci/java-play-framework-async.json b/bin/ci/java-play-framework-async.json deleted file mode 100644 index 0b8a369707..0000000000 --- a/bin/ci/java-play-framework-async.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "!include": "bin/java-play-framework-petstore-server-async.json", - "generatorName": "java-play-framework", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/java-play-framework-async", - "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-play-framework-controller-only.json b/bin/ci/java-play-framework-controller-only.json deleted file mode 100644 index 4cb2c55db2..0000000000 --- a/bin/ci/java-play-framework-controller-only.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "generatorName": "java-play-framework", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/java-play-framework-controller-only", - "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", - "additionalProperties": { - "hideGenerationTimestamp": true, - "controllerOnly": true - } -} \ No newline at end of file diff --git a/bin/ci/java-play-framework-fake-endpoints.json b/bin/ci/java-play-framework-fake-endpoints.json deleted file mode 100644 index abcf09793b..0000000000 --- a/bin/ci/java-play-framework-fake-endpoints.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "generatorName": "java-play-framework", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/java-play-framework-fake-endpoints", - "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-play-framework-no-bean-validation.json b/bin/ci/java-play-framework-no-bean-validation.json deleted file mode 100644 index d0065ff626..0000000000 --- a/bin/ci/java-play-framework-no-bean-validation.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "generatorName": "java-play-framework", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/java-play-framework-no-bean-validation", - "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", - "additionalProperties": { - "hideGenerationTimestamp": true, - "useBeanValidation": false - } -} \ No newline at end of file diff --git a/bin/ci/java-play-framework-no-exception-handling.json b/bin/ci/java-play-framework-no-exception-handling.json deleted file mode 100644 index 5eb8619432..0000000000 --- a/bin/ci/java-play-framework-no-exception-handling.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "generatorName": "java-play-framework", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/java-play-framework-no-exception-handling", - "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", - "additionalProperties": { - "hideGenerationTimestamp": true, - "handleExceptions": false - } -} \ No newline at end of file diff --git a/bin/ci/java-play-framework-no-interface.json b/bin/ci/java-play-framework-no-interface.json deleted file mode 100644 index 50de0e4d7b..0000000000 --- a/bin/ci/java-play-framework-no-interface.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "generatorName": "java-play-framework", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/java-play-framework-no-interface", - "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", - "additionalProperties": { - "hideGenerationTimestamp": true, - "useInterfaces": false - } -} \ No newline at end of file diff --git a/bin/ci/java-play-framework-no-swagger-ui.json b/bin/ci/java-play-framework-no-swagger-ui.json deleted file mode 100644 index 388744e3a9..0000000000 --- a/bin/ci/java-play-framework-no-swagger-ui.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "generatorName": "java-play-framework", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/java-play-framework-no-swagger-ui", - "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", - "additionalProperties": { - "hideGenerationTimestamp": true, - "useSwaggerUI": false - } -} \ No newline at end of file diff --git a/bin/ci/java-play-framework-no-wrap-calls.json b/bin/ci/java-play-framework-no-wrap-calls.json deleted file mode 100644 index 36bb667246..0000000000 --- a/bin/ci/java-play-framework-no-wrap-calls.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "generatorName": "java-play-framework", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/java-play-framework-no-wrap-calls", - "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", - "additionalProperties": { - "hideGenerationTimestamp": true, - "wrapCalls": false - } -} \ No newline at end of file diff --git a/bin/ci/java-play-framework.json b/bin/ci/java-play-framework.json deleted file mode 100644 index a94f7f54e9..0000000000 --- a/bin/ci/java-play-framework.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "generatorName": "java-play-framework", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/java-play-framework", - "templateDir": "modules/openapi-generator/src/main/resources/JavaPlayFramework", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-rest-assured-jackson.json b/bin/ci/java-rest-assured-jackson.json deleted file mode 100644 index c652a9bf7a..0000000000 --- a/bin/ci/java-rest-assured-jackson.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "!include": "bin/java-petstore-rest-assured-jackson.json", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/rest-assured-jackson", - "templateDir": "modules/openapi-generator/src/main/resources/Java", - "additionalProperties": { - "hideGenerationTimestamp": true, - "booleanGetterPrefix": "is", - "java8": "true", - "dateLibrary": "java8", - "serializationLibrary": "jackson", - "useBeanValidation": "true", - "performBeanValidation": "true" - } -} diff --git a/bin/ci/java-rest-assured.json b/bin/ci/java-rest-assured.json deleted file mode 100644 index c1328500ad..0000000000 --- a/bin/ci/java-rest-assured.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "!include": "bin/java-petstore-rest-assured.json", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/rest-assured", - "templateDir": "modules/openapi-generator/src/main/resources/Java", - "additionalProperties": { - "hideGenerationTimestamp": true, - "booleanGetterPrefix": "is" - } -} \ No newline at end of file diff --git a/bin/ci/java-resteasy.json b/bin/ci/java-resteasy.json deleted file mode 100644 index 8a86a9be13..0000000000 --- a/bin/ci/java-resteasy.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "!include": "bin/java-petstore-resteasy.json", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/resteasy", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-resttemplate-withXml.json b/bin/ci/java-resttemplate-withXml.json deleted file mode 100644 index e05ea6c1cc..0000000000 --- a/bin/ci/java-resttemplate-withXml.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "!include": "bin/java-petstore-resttemplate.json", - "artifactId": "petstore-resttemplate-withxml", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/resttemplate-withXml", - "additionalProperties": { - "hideGenerationTimestamp": true, - "withXml": true - } -} \ No newline at end of file diff --git a/bin/ci/java-resttemplate.json b/bin/ci/java-resttemplate.json deleted file mode 100644 index 9411e39e8b..0000000000 --- a/bin/ci/java-resttemplate.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "!include": "bin/java-petstore-resttemplate.json", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/resttemplate", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-retrofit.json b/bin/ci/java-retrofit.json deleted file mode 100644 index 65ded148ba..0000000000 --- a/bin/ci/java-retrofit.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "!include": "bin/java-petstore-retrofit.json", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/retrofit", - "additionalProperties": { - "hideGenerationTimestamp": true, - "dateLibrary": "joda" - } -} \ No newline at end of file diff --git a/bin/ci/java-retrofit2-play24.json b/bin/ci/java-retrofit2-play24.json deleted file mode 100644 index 208c9173ae..0000000000 --- a/bin/ci/java-retrofit2-play24.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "!include": "bin/java-petstore-retrofit2-play24.json", - "artifactId": "petstore-java-client-retrofit2-play24", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/retrofit2-play24", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-retrofit2-play25.json b/bin/ci/java-retrofit2-play25.json deleted file mode 100644 index e28b883137..0000000000 --- a/bin/ci/java-retrofit2-play25.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "!include": "bin/java-petstore-retrofit2-play25.json", - "artifactId": "petstore-java-client-retrofit2-play25", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/retrofit2-play25", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-retrofit2-play26.json b/bin/ci/java-retrofit2-play26.json deleted file mode 100644 index 0068c156b2..0000000000 --- a/bin/ci/java-retrofit2-play26.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "!include": "bin/java-petstore-retrofit2-play26.json", - "artifactId": "petstore-java-client-retrofit2-play26", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/retrofit2-play26", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-retrofit2.json b/bin/ci/java-retrofit2.json deleted file mode 100644 index 8f2c2a8fba..0000000000 --- a/bin/ci/java-retrofit2.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "!include": "bin/java-petstore-retrofit2.json", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/retrofit2", - "templateDir": "modules/openapi-generator/src/main/resources/Java", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-retrofit2rx.json b/bin/ci/java-retrofit2rx.json deleted file mode 100644 index 35ca3ab583..0000000000 --- a/bin/ci/java-retrofit2rx.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "!include": "bin/java-petstore-retrofit2rx.json", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/retrofit2rx", - "templateDir": "modules/openapi-generator/src/main/resources/Java", - "additionalProperties": { - "useRxJava": true, - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-retrofit2rx2.json b/bin/ci/java-retrofit2rx2.json deleted file mode 100644 index ce0d7d89d4..0000000000 --- a/bin/ci/java-retrofit2rx2.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "!include": "bin/java-petstore-retrofit2rx2.json", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/retrofit2rx2", - "templateDir": "modules/openapi-generator/src/main/resources/Java", - "additionalProperties": { - "useRxJava2": true, - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-vertx.json b/bin/ci/java-vertx.json deleted file mode 100644 index 2eb162e1c3..0000000000 --- a/bin/ci/java-vertx.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "!include": "bin/java-petstore-vertx.json", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/vertx", - "templateDir": "modules/openapi-generator/src/main/resources/Java", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/java-webclient.json b/bin/ci/java-webclient.json deleted file mode 100644 index 6c2dfdee88..0000000000 --- a/bin/ci/java-webclient.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "!include": "bin/java-petstore-webclient.json", - "generatorName": "java", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/java/webclient", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/javascript-petstore-1.json b/bin/ci/javascript-petstore-1.json deleted file mode 100644 index 820982bd59..0000000000 --- a/bin/ci/javascript-petstore-1.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "generatorName": "javascript", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/javascript-promise", - "templateDir": "modules/openapi-generator/src/main/resources/Javascript", - "additionalProperties": { - "usePromises": true, - "useES6": false, - "appName": "PetstoreClient" - } -} \ No newline at end of file diff --git a/bin/ci/javascript-petstore-2.json b/bin/ci/javascript-petstore-2.json deleted file mode 100644 index 5d545ded32..0000000000 --- a/bin/ci/javascript-petstore-2.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "generatorName": "javascript", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/javascript-es6", - "templateDir": "modules/openapi-generator/src/main/resources/Javascript/es6", - "additionalProperties": { - "appName": "PetstoreClient" - } -} \ No newline at end of file diff --git a/bin/ci/javascript-petstore-3.json b/bin/ci/javascript-petstore-3.json deleted file mode 100644 index 662aca5320..0000000000 --- a/bin/ci/javascript-petstore-3.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "generatorName": "javascript", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/javascript-promise-es6", - "templateDir": "modules/openapi-generator/src/main/resources/Javascript/es6", - "additionalProperties": { - "appName": "PetstoreClient", - "usePromises": true, - "useES6": true - } -} \ No newline at end of file diff --git a/bin/ci/javascript-petstore.json b/bin/ci/javascript-petstore.json deleted file mode 100644 index 0e85caf8cf..0000000000 --- a/bin/ci/javascript-petstore.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "generatorName": "javascript", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/javascript", - "templateDir": "modules/openapi-generator/src/main/resources/Javascript", - "additionalProperties": { - "appName": "PetstoreClient", - "useES6": false - } -} \ No newline at end of file diff --git a/bin/ci/kotlin-client-petstore-multiplatform.json b/bin/ci/kotlin-client-petstore-multiplatform.json deleted file mode 100644 index 1459a1dbf7..0000000000 --- a/bin/ci/kotlin-client-petstore-multiplatform.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "artifactId": "kotlin-client-petstore-multiplatform", - "generatorName": "kotlin", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/kotlin-multiplatform", - "templateDir": "modules/openapi-generator/src/main/resources/kotlin-client", - "library": "multiplatform", - "additionalProperties": { - "dateLibrary": "java8" - } -} \ No newline at end of file diff --git a/bin/ci/kotlin-client-petstore.json b/bin/ci/kotlin-client-petstore.json deleted file mode 100644 index 55faa24802..0000000000 --- a/bin/ci/kotlin-client-petstore.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "artifactId": "kotlin-petstore-client", - "generatorName": "kotlin", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/kotlin", - "templateDir": "modules/openapi-generator/src/main/resources/kotlin-client", - "additionalProperties": { - "dateLibrary": "java8", - "serializableModel": "true" - } -} \ No newline at end of file diff --git a/bin/ci/kotlin-client-string.json b/bin/ci/kotlin-client-string.json deleted file mode 100644 index cceb366c2c..0000000000 --- a/bin/ci/kotlin-client-string.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "artifactId": "kotlin-petstore-string", - "generatorName": "kotlin", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/kotlin-string", - "templateDir": "modules/openapi-generator/src/main/resources/kotlin-client", - "additionalProperties": { - "dateLibrary": "string", - "serializableModel": "true", - "sortParamsByRequiredFlag": "false", - "sortModelPropertiesByRequiredFlag": "false" - } -} \ No newline at end of file diff --git a/bin/ci/kotlin-client-threetenbp.json b/bin/ci/kotlin-client-threetenbp.json deleted file mode 100644 index 9f12cd38b2..0000000000 --- a/bin/ci/kotlin-client-threetenbp.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "artifactId": "kotlin-petstore-threetenbp", - "generatorName": "kotlin", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/kotlin-threetenbp", - "templateDir": "modules/openapi-generator/src/main/resources/kotlin-client", - "additionalProperties": { - "dateLibrary": "threetenbp" - } -} \ No newline at end of file diff --git a/bin/ci/kotlin-server-petstore.json b/bin/ci/kotlin-server-petstore.json deleted file mode 100644 index dfd64c1425..0000000000 --- a/bin/ci/kotlin-server-petstore.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "generatorName": "kotlin-server", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "library": "ktor", - "outputDir": "samples/server/petstore/kotlin-server/ktor", - "templateDir": "modules/openapi-generator/src/main/resources/kotlin-server", - "additionalProperties": { - "hideGenerationTimestamp": true, - "serializableModel": "true" - } -} \ No newline at end of file diff --git a/bin/ci/kotlin-springboot-petstore-server-reactive.json b/bin/ci/kotlin-springboot-petstore-server-reactive.json deleted file mode 100644 index fd2e318f8b..0000000000 --- a/bin/ci/kotlin-springboot-petstore-server-reactive.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "generatorName": "kotlin-spring", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/kotlin-springboot-reactive", - "templateDir": "modules/openapi-generator/src/main/resources/kotlin-spring", - "additionalProperties": { - "library": "spring-boot", - "beanValidations": true, - "swaggerAnnotations": true, - "serviceImplementation": true, - "reactive": true - } -} \ No newline at end of file diff --git a/bin/ci/kotlin-springboot-petstore-server.json b/bin/ci/kotlin-springboot-petstore-server.json deleted file mode 100644 index 71597b8df2..0000000000 --- a/bin/ci/kotlin-springboot-petstore-server.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "generatorName": "kotlin-spring", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/kotlin-springboot", - "templateDir": "modules/openapi-generator/src/main/resources/kotlin-spring", - "additionalProperties": { - "library": "spring-boot", - "beanValidations": true, - "swaggerAnnotations": true, - "serviceImplementation": true - } -} \ No newline at end of file diff --git a/bin/ci/mysql-schema-petstore.json b/bin/ci/mysql-schema-petstore.json deleted file mode 100644 index 6937721ece..0000000000 --- a/bin/ci/mysql-schema-petstore.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "generatorName": "mysql-schema", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/schema/petstore/mysql", - "templateDir": "modules/openapi-generator/src/main/resources/mysql-schema" -} \ No newline at end of file diff --git a/bin/ci/openapi3-jaxrs-jersey-petstore.json b/bin/ci/openapi3-jaxrs-jersey-petstore.json deleted file mode 100644 index 5065fb2c38..0000000000 --- a/bin/ci/openapi3-jaxrs-jersey-petstore.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "artifactId": "openapiv3-jaxrs-jersey-petstore-server", - "generatorName": "jaxrs-jersey", - "inputSpec": "modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/jaxrs-jersey", - "templateDir": "modules/openapi-generator/src/main/resources/JavaJaxRS/", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/openapi3-php-petstore.json b/bin/ci/openapi3-php-petstore.json deleted file mode 100644 index 47e2dba985..0000000000 --- a/bin/ci/openapi3-php-petstore.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "generatorName": "php", - "inputSpec": "modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/openapi3/client/petstore/php/OpenAPIClient-php", - "templateDir": "modules/openapi-generator/src/main/resources/php" -} \ No newline at end of file diff --git a/bin/ci/openapi3-python-petstore.json b/bin/ci/openapi3-python-petstore.json deleted file mode 100644 index 7945bd9d6d..0000000000 --- a/bin/ci/openapi3-python-petstore.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "generatorName": "python", - "inputSpec": "modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/openapi3/client/petstore/python/", - "templateDir": "modules/openapi-generator/src/main/resources/python", - "additionalProperties": { - "packageName": "petstore_api" - } -} \ No newline at end of file diff --git a/bin/ci/openapi3-ruby-client-faraday-petstore.json b/bin/ci/openapi3-ruby-client-faraday-petstore.json deleted file mode 100644 index be0b61db99..0000000000 --- a/bin/ci/openapi3-ruby-client-faraday-petstore.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "!include": "bin/openapi3/ruby-petstore-faraday.json", - "generatorName": "ruby", - "inputSpec": "modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/openapi3/client/petstore/ruby-faraday", - "templateDir": "modules/openapi-generator/src/main/resources/ruby-client", - "additionalProperties": { - "skipFormModel": true - } -} \ No newline at end of file diff --git a/bin/ci/openapi3-ruby-client-petstore.json b/bin/ci/openapi3-ruby-client-petstore.json deleted file mode 100644 index 91018e54a4..0000000000 --- a/bin/ci/openapi3-ruby-client-petstore.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "!include": "bin/ruby-petstore.json", - "generatorName": "ruby", - "inputSpec": "modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/openapi3/client/petstore/ruby", - "templateDir": "modules/openapi-generator/src/main/resources/ruby-client", - "additionalProperties": { - "skipFormModel": true - } -} \ No newline at end of file diff --git a/bin/ci/perl-petstore-1.json b/bin/ci/perl-petstore-1.json deleted file mode 100644 index 985f6b3bd1..0000000000 --- a/bin/ci/perl-petstore-1.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "generatorName": "perl", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/perl/deep_module_test", - "outputDir": "samples/client/petstore/perl/deep_module_test", - "additionalProperties": { - "hideGenerationTimestamp": true, - "moduleName": "Something::Deep" - } -} \ No newline at end of file diff --git a/bin/ci/perl-petstore.json b/bin/ci/perl-petstore.json deleted file mode 100644 index d726e633bd..0000000000 --- a/bin/ci/perl-petstore.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "generatorName": "perl", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/perl", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/php-lumen-petstore-server.json b/bin/ci/php-lumen-petstore-server.json deleted file mode 100644 index 87755152ea..0000000000 --- a/bin/ci/php-lumen-petstore-server.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "generatorName": "php-lumen", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/php-lumen", - "templateDir": "modules/openapi-generator/src/main/resources/php-lumen" -} \ No newline at end of file diff --git a/bin/ci/php-petstore.json b/bin/ci/php-petstore.json deleted file mode 100644 index fd3f1d1c24..0000000000 --- a/bin/ci/php-petstore.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "generatorName": "php", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/php/OpenAPIClient-php", - "templateDir": "modules/openapi-generator/src/main/resources/php" -} \ No newline at end of file diff --git a/bin/ci/php-silex-petstore-server.json b/bin/ci/php-silex-petstore-server.json deleted file mode 100644 index cffd6a8cef..0000000000 --- a/bin/ci/php-silex-petstore-server.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "generatorName": "php-silex-deprecated", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/php-silex/OpenAPIServer", - "templateDir": "modules/openapi-generator/src/main/resources/php-silex" -} \ No newline at end of file diff --git a/bin/ci/php-slim-server-petstore.json b/bin/ci/php-slim-server-petstore.json deleted file mode 100644 index 4341586b33..0000000000 --- a/bin/ci/php-slim-server-petstore.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "generatorName": "php-slim-deprecated", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/php-slim", - "templateDir": "modules/openapi-generator/src/main/resources/php-slim-server" -} \ No newline at end of file diff --git a/bin/ci/php-slim4-server-petstore.json b/bin/ci/php-slim4-server-petstore.json deleted file mode 100644 index 48de8dd691..0000000000 --- a/bin/ci/php-slim4-server-petstore.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "generatorName": "php-slim4", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/php-slim4", - "templateDir": "modules/openapi-generator/src/main/resources/php-slim4-server" -} \ No newline at end of file diff --git a/bin/ci/php-symfony-petstore.json b/bin/ci/php-symfony-petstore.json deleted file mode 100644 index 8af199acbc..0000000000 --- a/bin/ci/php-symfony-petstore.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "generatorName": "php-symfony", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/server/petstore/php-symfony/SymfonyBundle-php", - "templateDir": "modules/openapi-generator/src/main/resources/php-symfony" -} \ No newline at end of file diff --git a/bin/ci/php-ze-ph-petstore-server.json b/bin/ci/php-ze-ph-petstore-server.json deleted file mode 100644 index 2f02c99e22..0000000000 --- a/bin/ci/php-ze-ph-petstore-server.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "generatorName": "php-ze-ph", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/php-ze-ph", - "templateDir": "modules/openapi-generator/src/main/resources/php-ze-ph" -} \ No newline at end of file diff --git a/bin/ci/python-experimental.json b/bin/ci/python-experimental.json deleted file mode 100644 index d9f6d70db2..0000000000 --- a/bin/ci/python-experimental.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "generatorName": "python-experimental", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/python-experimental", - "templateDir": "modules/openapi-generator/src/main/resources/python", - "additionalProperties": { - "packageName": "petstore_api" - } -} \ No newline at end of file diff --git a/bin/ci/python-petstore-1.json b/bin/ci/python-petstore-1.json deleted file mode 100644 index 730545175c..0000000000 --- a/bin/ci/python-petstore-1.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "generatorName": "python", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/python", - "templateDir": "modules/openapi-generator/src/main/resources/python", - "additionalProperties": { - "packageName": "petstore_api" - } -} \ No newline at end of file diff --git a/bin/ci/python-petstore-2.json b/bin/ci/python-petstore-2.json deleted file mode 100644 index 1a48b15b60..0000000000 --- a/bin/ci/python-petstore-2.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "generatorName": "python", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "library": "tornado", - "outputDir": "samples/client/petstore/python-tornado", - "templateDir": "modules/openapi-generator/src/main/resources/python", - "additionalProperties": { - "packageName": "petstore_api" - } -} \ No newline at end of file diff --git a/bin/ci/python-petstore.json b/bin/ci/python-petstore.json deleted file mode 100644 index 5af62cb71e..0000000000 --- a/bin/ci/python-petstore.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "generatorName": "python", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "library": "asyncio", - "outputDir": "samples/client/petstore/python-asyncio", - "templateDir": "modules/openapi-generator/src/main/resources/python", - "additionalProperties": { - "packageName": "petstore_api" - } -} \ No newline at end of file diff --git a/bin/ci/r-petstore.json b/bin/ci/r-petstore.json deleted file mode 100644 index 26889a24f9..0000000000 --- a/bin/ci/r-petstore.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "generatorName": "r", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/R", - "templateDir": "modules/openapi-generator/src/main/resources/r", - "additionalProperties": { - "packageName": "petstore" - } -} \ No newline at end of file diff --git a/bin/ci/ruby-client-petstore-faraday.json b/bin/ci/ruby-client-petstore-faraday.json deleted file mode 100644 index cc3a4a6993..0000000000 --- a/bin/ci/ruby-client-petstore-faraday.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "!include": "bin/ruby-petstore-faraday.json", - "generatorName": "ruby", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/ruby-faraday", - "templateDir": "modules/openapi-generator/src/main/resources/ruby-client" -} \ No newline at end of file diff --git a/bin/ci/ruby-client-petstore.json b/bin/ci/ruby-client-petstore.json deleted file mode 100644 index 409f07df11..0000000000 --- a/bin/ci/ruby-client-petstore.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "!include": "bin/ruby-petstore.json", - "generatorName": "ruby", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/client/petstore/ruby", - "templateDir": "modules/openapi-generator/src/main/resources/ruby-client" -} \ No newline at end of file diff --git a/bin/ci/rust-server-petstore-1.json b/bin/ci/rust-server-petstore-1.json deleted file mode 100644 index 9094bb9072..0000000000 --- a/bin/ci/rust-server-petstore-1.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "generateAliasAsModel": true, - "generatorName": "rust-server", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/rust-server/rust-server-test.yaml", - "outputDir": "samples/server/petstore/rust-server/output/rust-server-test", - "templateDir": "modules/openapi-generator/src/main/resources/rust-server", - "additionalProperties": { - "packageName": "rust-server-test", - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/rust-server-petstore-2.json b/bin/ci/rust-server-petstore-2.json deleted file mode 100644 index 1ddfe29dd9..0000000000 --- a/bin/ci/rust-server-petstore-2.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "generateAliasAsModel": true, - "generatorName": "rust-server", - "inputSpec": "modules/openapi-generator/src/test/resources/3_0/rust-server/multipart-v3.yaml", - "outputDir": "samples/server/petstore/rust-server/output/multipart-v3", - "templateDir": "modules/openapi-generator/src/main/resources/rust-server", - "additionalProperties": { - "packageName": "multipart-v3", - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/rust-server-petstore-3.json b/bin/ci/rust-server-petstore-3.json deleted file mode 100644 index 7291e9c73d..0000000000 --- a/bin/ci/rust-server-petstore-3.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "generateAliasAsModel": true, - "generatorName": "rust-server", - "inputSpec": "modules/openapi-generator/src/test/resources/3_0/rust-server/openapi-v3.yaml", - "outputDir": "samples/server/petstore/rust-server/output/openapi-v3", - "templateDir": "modules/openapi-generator/src/main/resources/rust-server", - "additionalProperties": { - "packageName": "openapi-v3", - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/rust-server-petstore-4.json b/bin/ci/rust-server-petstore-4.json deleted file mode 100644 index 0e85d34e8e..0000000000 --- a/bin/ci/rust-server-petstore-4.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "generateAliasAsModel": true, - "generatorName": "rust-server", - "inputSpec": "modules/openapi-generator/src/test/resources/3_0/rust-server/ops-v3.yaml", - "outputDir": "samples/server/petstore/rust-server/output/ops-v3", - "templateDir": "modules/openapi-generator/src/main/resources/rust-server", - "additionalProperties": { - "packageName": "ops-v3", - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/rust-server-petstore.json b/bin/ci/rust-server-petstore.json deleted file mode 100644 index e258a06008..0000000000 --- a/bin/ci/rust-server-petstore.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "generateAliasAsModel": true, - "generatorName": "rust-server", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/rust-server/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing", - "templateDir": "modules/openapi-generator/src/main/resources/rust-server", - "additionalProperties": { - "packageName": "petstore-with-fake-endpoints-models-for-testing", - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/spring-cloud-async.json b/bin/ci/spring-cloud-async.json deleted file mode 100644 index 8589521935..0000000000 --- a/bin/ci/spring-cloud-async.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "!include": "bin/spring-cloud-feign-petstore.json", - "generatorName": "spring", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/spring-cloud-async", - "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud", - "additionalProperties": { - "hideGenerationTimestamp": true, - "java8": true, - "async": true - } -} \ No newline at end of file diff --git a/bin/ci/spring-cloud-feign-petstore.json b/bin/ci/spring-cloud-feign-petstore.json deleted file mode 100644 index b402ba8c00..0000000000 --- a/bin/ci/spring-cloud-feign-petstore.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "!include": "bin/spring-cloud-feign-petstore.json", - "generatorName": "spring", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/spring-cloud", - "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud", - "additionalProperties": { - "hideGenerationTimestamp": true, - "responseWrapper": "HystrixCommand" - } -} \ No newline at end of file diff --git a/bin/ci/spring-petstore-10.json b/bin/ci/spring-petstore-10.json deleted file mode 100644 index ba76388c1b..0000000000 --- a/bin/ci/spring-petstore-10.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "!include": "bin/springboot-petstore-server-beanvalidation.json", - "generatorName": "spring", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/springboot-beanvalidation", - "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", - "additionalProperties": { - "hideGenerationTimestamp": true, - "java8": false - } -} \ No newline at end of file diff --git a/bin/ci/spring-petstore-11.json b/bin/ci/spring-petstore-11.json deleted file mode 100644 index 6f2efc5529..0000000000 --- a/bin/ci/spring-petstore-11.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "!include": "bin/springboot-petstore-server-implicitHeaders.json", - "artifactId": "springboot-implicitHeaders", - "generatorName": "spring", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/springboot-implicitHeaders", - "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/spring-petstore-12.json b/bin/ci/spring-petstore-12.json deleted file mode 100644 index cab75e7ae3..0000000000 --- a/bin/ci/spring-petstore-12.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "!include": "bin/springboot-petstore-server-useOptional.json", - "generatorName": "spring", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/springboot-useoptional", - "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/spring-petstore-13.json b/bin/ci/spring-petstore-13.json deleted file mode 100644 index 375efe85a7..0000000000 --- a/bin/ci/spring-petstore-13.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "!include": "bin/springboot-virtualan-petstore-server.json", - "artifactId": "springboot-virtualan", - "generatorName": "spring", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/springboot-virtualan", - "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", - "additionalProperties": { - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/spring-petstore-2.json b/bin/ci/spring-petstore-2.json deleted file mode 100644 index ba55139885..0000000000 --- a/bin/ci/spring-petstore-2.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "artifactId": "spring-stubs", - "generatorName": "spring", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/spring-stubs", - "additionalProperties": { - "interfaceOnly": true, - "singleContentTypes": true, - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/spring-petstore-3.json b/bin/ci/spring-petstore-3.json deleted file mode 100644 index 36ee23c72b..0000000000 --- a/bin/ci/spring-petstore-3.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "!include": "bin/spring-mvc-petstore-server.json", - "generatorName": "spring", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/spring-mvc", - "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", - "additionalProperties": { - "hideGenerationTimestamp": true, - "java8": false, - "serverPort": "8002", - "booleanGetterPrefix": "get" - } -} \ No newline at end of file diff --git a/bin/ci/spring-petstore-4.json b/bin/ci/spring-petstore-4.json deleted file mode 100644 index 5b9f3b774a..0000000000 --- a/bin/ci/spring-petstore-4.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "!include": "bin/spring-mvc-petstore-j8-async.json", - "generatorName": "spring", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/spring-mvc-j8-async", - "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", - "additionalProperties": { - "hideGenerationTimestamp": true, - "async": true, - "serverPort": "8002" - } -} \ No newline at end of file diff --git a/bin/ci/spring-petstore-5.json b/bin/ci/spring-petstore-5.json deleted file mode 100644 index 9978d15d09..0000000000 --- a/bin/ci/spring-petstore-5.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "!include": "bin/spring-mvc-petstore-j8-localdatetime.json", - "generatorName": "spring", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/spring-mvc-j8-localdatetime", - "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", - "additionalProperties": { - "hideGenerationTimestamp": true, - "booleanGetterPrefix": "get", - "serverPort": "8002" - } -} \ No newline at end of file diff --git a/bin/ci/spring-petstore-6.json b/bin/ci/spring-petstore-6.json deleted file mode 100644 index 4a5aed031f..0000000000 --- a/bin/ci/spring-petstore-6.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "artifactId": "springboot-delegate", - "generatorName": "spring", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/springboot-delegate", - "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", - "additionalProperties": { - "delegatePattern": true, - "hideGenerationTimestamp": true, - "java8": false - } -} \ No newline at end of file diff --git a/bin/ci/spring-petstore-7.json b/bin/ci/spring-petstore-7.json deleted file mode 100644 index 7863b8d9d7..0000000000 --- a/bin/ci/spring-petstore-7.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "artifactId": "springboot-delegate-j8", - "generatorName": "spring", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/springboot-delegate-j8", - "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", - "additionalProperties": { - "delegatePattern": true, - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/spring-petstore-8.json b/bin/ci/spring-petstore-8.json deleted file mode 100644 index 840e4fa8c4..0000000000 --- a/bin/ci/spring-petstore-8.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "artifactId": "springboot", - "generatorName": "spring", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/springboot", - "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", - "additionalProperties": { - "hideGenerationTimestamp": true, - "snapshotVersion": true - } -} \ No newline at end of file diff --git a/bin/ci/spring-petstore-9.json b/bin/ci/spring-petstore-9.json deleted file mode 100644 index 1955fd5794..0000000000 --- a/bin/ci/spring-petstore-9.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "artifactId": "springboot-reactive", - "generatorName": "spring", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml", - "outputDir": "samples/server/petstore/springboot-reactive", - "templateDir": "modules/openapi-generator/src/main/resources/JavaSpring", - "additionalProperties": { - "reactive": true, - "delegatePattern": true, - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/spring-stubs.json b/bin/ci/spring-stubs.json deleted file mode 100644 index 583fed6e25..0000000000 --- a/bin/ci/spring-stubs.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "generatorName": "spring", - "artifactId": "spring-stubs", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/spring-stubs", - "additionalProperties": { - "interfaceOnly": true, - "singleContentTypes": true, - "hideGenerationTimestamp": true - } -} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-1.json b/bin/ci/typescript-angular-petstore-1.json deleted file mode 100644 index a82cb8c048..0000000000 --- a/bin/ci/typescript-angular-petstore-1.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "!include": "bin/typescript-petstore-npm.json", - "generatorName": "typescript-angular", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-angular-v2/npm", - "additionalProperties": { - "ngVersion": "2" - } -} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-10.json b/bin/ci/typescript-angular-petstore-10.json deleted file mode 100644 index 0bbd411378..0000000000 --- a/bin/ci/typescript-angular-petstore-10.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "!include": "bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.json", - "generatorName": "typescript-angular", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm", - "additionalProperties": { - "ngVersion": "7.0.0", - "providedInRoot": false - } -} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-11.json b/bin/ci/typescript-angular-petstore-11.json deleted file mode 100644 index 8f62c2a7f0..0000000000 --- a/bin/ci/typescript-angular-petstore-11.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "generatorName": "typescript-angular", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default", - "additionalProperties": { - "ngVersion": "7.0.0" - } -} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-12.json b/bin/ci/typescript-angular-petstore-12.json deleted file mode 100644 index 3a7f640939..0000000000 --- a/bin/ci/typescript-angular-petstore-12.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "!include": "bin/typescript-angular-v7-petstore-provided-in-root-with-npm.json", - "generatorName": "typescript-angular", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm", - "additionalProperties": { - "ngVersion": "7.0.0" - } -} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-13.json b/bin/ci/typescript-angular-petstore-13.json deleted file mode 100644 index 1fa9f8a20d..0000000000 --- a/bin/ci/typescript-angular-petstore-13.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "!include": "bin/typescript-angular-v8-petstore-provided-in-root-with-npm.json", - "generatorName": "typescript-angular", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm", - "additionalProperties": { - "ngVersion": "8.0.0" - } -} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-2.json b/bin/ci/typescript-angular-petstore-2.json deleted file mode 100644 index 2e79f71fa8..0000000000 --- a/bin/ci/typescript-angular-petstore-2.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "generatorName": "typescript-angular", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-angular-v2/with-interfaces", - "additionalProperties": { - "ngVersion": "2", - "withInterfaces": true - } -} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-3.json b/bin/ci/typescript-angular-petstore-3.json deleted file mode 100644 index 3b343648d9..0000000000 --- a/bin/ci/typescript-angular-petstore-3.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "!include": "bin/typescript-petstore-npm.json", - "generatorName": "typescript-angular", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-angular-v4/npm", - "additionalProperties": { - "ngVersion": "4" - } -} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-4.json b/bin/ci/typescript-angular-petstore-4.json deleted file mode 100644 index ffd19d1656..0000000000 --- a/bin/ci/typescript-angular-petstore-4.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "!include": "bin/typescript-petstore-npm.json", - "generatorName": "typescript-angular", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-angular-v4.3/npm", - "additionalProperties": { - "ngVersion": "4.3" - } -} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-5.json b/bin/ci/typescript-angular-petstore-5.json deleted file mode 100644 index 44c7e1fe13..0000000000 --- a/bin/ci/typescript-angular-petstore-5.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "generatorName": "typescript-angular", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default", - "additionalProperties": { - "ngVersion": "6.0.0", - "providedInRoot": false - } -} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-6.json b/bin/ci/typescript-angular-petstore-6.json deleted file mode 100644 index 5965a2e92f..0000000000 --- a/bin/ci/typescript-angular-petstore-6.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "!include": "bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.json", - "generatorName": "typescript-angular", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm", - "additionalProperties": { - "ngVersion": "6.0.0", - "providedInRoot": false - } -} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-7.json b/bin/ci/typescript-angular-petstore-7.json deleted file mode 100644 index 638a3464ef..0000000000 --- a/bin/ci/typescript-angular-petstore-7.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "generatorName": "typescript-angular", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default", - "additionalProperties": { - "ngVersion": "6.0.0" - } -} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-8.json b/bin/ci/typescript-angular-petstore-8.json deleted file mode 100644 index 9bf237a3b3..0000000000 --- a/bin/ci/typescript-angular-petstore-8.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "!include": "bin/typescript-angular-v6-petstore-provided-in-root-with-npm.json", - "generatorName": "typescript-angular", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm", - "additionalProperties": { - "ngVersion": "6.0.0" - } -} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore-9.json b/bin/ci/typescript-angular-petstore-9.json deleted file mode 100644 index 0d672e6f09..0000000000 --- a/bin/ci/typescript-angular-petstore-9.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "generatorName": "typescript-angular", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default", - "additionalProperties": { - "ngVersion": "7.0.0", - "providedInRoot": false - } -} \ No newline at end of file diff --git a/bin/ci/typescript-angular-petstore.json b/bin/ci/typescript-angular-petstore.json deleted file mode 100644 index f086745732..0000000000 --- a/bin/ci/typescript-angular-petstore.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "generatorName": "typescript-angular", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-angular-v2/default", - "additionalProperties": { - "ngVersion": "2" - } -} \ No newline at end of file diff --git a/bin/ci/typescript-angularjs-petstore.json b/bin/ci/typescript-angularjs-petstore.json deleted file mode 100644 index 2f7f668272..0000000000 --- a/bin/ci/typescript-angularjs-petstore.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "generatorName": "typescript-angularjs", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-angularjs" -} \ No newline at end of file diff --git a/bin/ci/typescript-aurelia-petstore.json b/bin/ci/typescript-aurelia-petstore.json deleted file mode 100644 index 24229cbdf7..0000000000 --- a/bin/ci/typescript-aurelia-petstore.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "generatorName": "typescript-aurelia", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-aurelia/default" -} \ No newline at end of file diff --git a/bin/ci/typescript-axios-petstore-1.json b/bin/ci/typescript-axios-petstore-1.json deleted file mode 100644 index 5b63412ae8..0000000000 --- a/bin/ci/typescript-axios-petstore-1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "!include": "bin/typescript-axios-petstore-with-npm-version.json", - "generatorName": "typescript-axios", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-axios/builds/with-npm-version" -} \ No newline at end of file diff --git a/bin/ci/typescript-axios-petstore-2.json b/bin/ci/typescript-axios-petstore-2.json deleted file mode 100644 index 3f8539dcae..0000000000 --- a/bin/ci/typescript-axios-petstore-2.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "!include": "bin/typescript-axios-petstore-with-npm-version-and-separate-models-and-api.json", - "generatorName": "typescript-axios", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api" -} \ No newline at end of file diff --git a/bin/ci/typescript-axios-petstore-3.json b/bin/ci/typescript-axios-petstore-3.json deleted file mode 100644 index 0f25f11b31..0000000000 --- a/bin/ci/typescript-axios-petstore-3.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "generatorName": "typescript-axios", - "inputSpec": "modules/openapi-generator/src/test/resources/3_0/petstore-with-complex-headers.yaml", - "outputDir": "samples/client/petstore/typescript-axios/builds/with-complex-headers" -} \ No newline at end of file diff --git a/bin/ci/typescript-axios-petstore-4.json b/bin/ci/typescript-axios-petstore-4.json deleted file mode 100644 index d552953c58..0000000000 --- a/bin/ci/typescript-axios-petstore-4.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "generatorName": "typescript-axios", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-axios/builds/with-interfaces", - "additionalProperties": { - "withInterfaces": true - } -} \ No newline at end of file diff --git a/bin/ci/typescript-axios-petstore-5.json b/bin/ci/typescript-axios-petstore-5.json deleted file mode 100644 index f8d998f1c9..0000000000 --- a/bin/ci/typescript-axios-petstore-5.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "generatorName": "typescript-axios", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-axios/builds/default" -} \ No newline at end of file diff --git a/bin/ci/typescript-axios-petstore.json b/bin/ci/typescript-axios-petstore.json deleted file mode 100644 index bb49285bb1..0000000000 --- a/bin/ci/typescript-axios-petstore.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "!include": "bin/typescript-axios-petstore-target-es6.json", - "generatorName": "typescript-axios", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-axios/builds/es6-target" -} \ No newline at end of file diff --git a/bin/ci/typescript-fetch-petstore-1.json b/bin/ci/typescript-fetch-petstore-1.json deleted file mode 100644 index 40abb9ef24..0000000000 --- a/bin/ci/typescript-fetch-petstore-1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "!include": "bin/typescript-fetch-petstore-with-npm-version.json", - "generatorName": "typescript-fetch", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-fetch/builds/with-npm-version" -} \ No newline at end of file diff --git a/bin/ci/typescript-fetch-petstore-2.json b/bin/ci/typescript-fetch-petstore-2.json deleted file mode 100644 index bc6e5f807c..0000000000 --- a/bin/ci/typescript-fetch-petstore-2.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "generatorName": "typescript-fetch", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-fetch/builds/with-interfaces", - "additionalProperties": { - "withInterfaces": true - } -} \ No newline at end of file diff --git a/bin/ci/typescript-fetch-petstore-3.json b/bin/ci/typescript-fetch-petstore-3.json deleted file mode 100644 index 0de17df51b..0000000000 --- a/bin/ci/typescript-fetch-petstore-3.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "generatorName": "typescript-fetch", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-fetch/builds/default" -} \ No newline at end of file diff --git a/bin/ci/typescript-fetch-petstore-4.json b/bin/ci/typescript-fetch-petstore-4.json deleted file mode 100644 index 1f434a0306..0000000000 --- a/bin/ci/typescript-fetch-petstore-4.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "!include": "bin/typescript-fetch-petstore-multiple-parameters.json", - "generatorName": "typescript-fetch", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-fetch/builds/multiple-parameters" -} \ No newline at end of file diff --git a/bin/ci/typescript-fetch-petstore-5.json b/bin/ci/typescript-fetch-petstore-5.json deleted file mode 100644 index 2905e73da8..0000000000 --- a/bin/ci/typescript-fetch-petstore-5.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "!include": "bin/typescript-fetch-petstore-prefix-parameter-interfaces.json", - "generatorName": "typescript-fetch", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces" -} \ No newline at end of file diff --git a/bin/ci/typescript-fetch-petstore.json b/bin/ci/typescript-fetch-petstore.json deleted file mode 100644 index 1f5fcf5f4b..0000000000 --- a/bin/ci/typescript-fetch-petstore.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "!include": "bin/typescript-fetch-petstore-target-es6.json", - "generatorName": "typescript-fetch", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-fetch/builds/es6-target" -} \ No newline at end of file diff --git a/bin/ci/typescript-inversify-petstore.json b/bin/ci/typescript-inversify-petstore.json deleted file mode 100644 index 8a15c316d3..0000000000 --- a/bin/ci/typescript-inversify-petstore.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "generatorName": "typescript-inversify", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-inversify" -} \ No newline at end of file diff --git a/bin/ci/typescript-jquery-petstore-1.json b/bin/ci/typescript-jquery-petstore-1.json deleted file mode 100644 index 6c0fac1642..0000000000 --- a/bin/ci/typescript-jquery-petstore-1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "!include": "bin/typescript-jquery-petstore-npm.json", - "generatorName": "typescript-jquery", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-jquery/npm" -} \ No newline at end of file diff --git a/bin/ci/typescript-jquery-petstore.json b/bin/ci/typescript-jquery-petstore.json deleted file mode 100644 index ea83a6088d..0000000000 --- a/bin/ci/typescript-jquery-petstore.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "generatorName": "typescript-jquery", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-jquery/default" -} \ No newline at end of file diff --git a/bin/ci/typescript-node-petstore-1.json b/bin/ci/typescript-node-petstore-1.json deleted file mode 100644 index 2610ca3ee1..0000000000 --- a/bin/ci/typescript-node-petstore-1.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "generatorName": "typescript-node", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-node/default" -} \ No newline at end of file diff --git a/bin/ci/typescript-node-petstore.json b/bin/ci/typescript-node-petstore.json deleted file mode 100644 index 99911c472b..0000000000 --- a/bin/ci/typescript-node-petstore.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "!include": "bin/typescript-node-petstore-npm.json", - "generatorName": "typescript-node", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-node/npm" -} \ No newline at end of file diff --git a/bin/ci/typescript-rxjs-petstore-1.json b/bin/ci/typescript-rxjs-petstore-1.json deleted file mode 100644 index 1686f9f00c..0000000000 --- a/bin/ci/typescript-rxjs-petstore-1.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "!include": "bin/typescript-rxjs-petstore-with-npm-version.json", - "generatorName": "typescript-rxjs", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-rxjs/builds/with-npm-version" -} \ No newline at end of file diff --git a/bin/ci/typescript-rxjs-petstore-2.json b/bin/ci/typescript-rxjs-petstore-2.json deleted file mode 100644 index 00e8f66a49..0000000000 --- a/bin/ci/typescript-rxjs-petstore-2.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "generatorName": "typescript-rxjs", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-rxjs/builds/with-interfaces", - "additionalProperties": { - "withInterfaces": true - } -} \ No newline at end of file diff --git a/bin/ci/typescript-rxjs-petstore-3.json b/bin/ci/typescript-rxjs-petstore-3.json deleted file mode 100644 index 7ee3fc8b24..0000000000 --- a/bin/ci/typescript-rxjs-petstore-3.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "generatorName": "typescript-rxjs", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-rxjs/builds/default" -} \ No newline at end of file diff --git a/bin/ci/typescript-rxjs-petstore.json b/bin/ci/typescript-rxjs-petstore.json deleted file mode 100644 index e5d9f0ec87..0000000000 --- a/bin/ci/typescript-rxjs-petstore.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "!include": "bin/typescript-rxjs-petstore-target-es6.json", - "generatorName": "typescript-rxjs", - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/typescript-rxjs/builds/es6-target" -} \ No newline at end of file diff --git a/bin/clojure-petstore.sh b/bin/clojure-petstore.sh deleted file mode 100755 index 299882e5ae..0000000000 --- a/bin/clojure-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.json -g clojure -o samples/client/petstore/clojure $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/configs/apex.yaml b/bin/configs/apex.yaml new file mode 100644 index 0000000000..23ec0ef743 --- /dev/null +++ b/bin/configs/apex.yaml @@ -0,0 +1,6 @@ +systemProperties: + skipFormModel: "true" +generatorName: apex +outputDir: samples/client/petstore/apex +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/apex diff --git a/bin/configs/cpp-qt5-qhttpengine-server.yaml b/bin/configs/cpp-qt5-qhttpengine-server.yaml new file mode 100644 index 0000000000..8ead0fe398 --- /dev/null +++ b/bin/configs/cpp-qt5-qhttpengine-server.yaml @@ -0,0 +1,4 @@ +generatorName: cpp-qt5-qhttpengine-server +outputDir: samples/server/petstore/cpp-qt5-qhttpengine-server +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server diff --git a/bin/configs/cpp-restsdk-client.yaml b/bin/configs/cpp-restsdk-client.yaml new file mode 100644 index 0000000000..87bce881bb --- /dev/null +++ b/bin/configs/cpp-restsdk-client.yaml @@ -0,0 +1,4 @@ +generatorName: cpp-restsdk +outputDir: samples/client/petstore/cpp-restsdk/client +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/cpp-rest-sdk-client diff --git a/bin/configs/csharp-OpenAPIClient.yaml b/bin/configs/csharp-OpenAPIClient.yaml new file mode 100644 index 0000000000..64800f8f78 --- /dev/null +++ b/bin/configs/csharp-OpenAPIClient.yaml @@ -0,0 +1,5 @@ +generatorName: csharp +outputDir: samples/client/petstore/csharp/OpenAPIClient +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' diff --git a/bin/configs/csharp-netcore-OpenAPIClient.yaml b/bin/configs/csharp-netcore-OpenAPIClient.yaml new file mode 100644 index 0000000000..0f2daf28a2 --- /dev/null +++ b/bin/configs/csharp-netcore-OpenAPIClient.yaml @@ -0,0 +1,7 @@ +generatorName: csharp-netcore +outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/csharp-netcore +additionalProperties: + packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' + useCompareNetObjects: "true" diff --git a/bin/configs/csharp-netcore-OpenAPIClientCore.yaml b/bin/configs/csharp-netcore-OpenAPIClientCore.yaml new file mode 100644 index 0000000000..1d710bbf20 --- /dev/null +++ b/bin/configs/csharp-netcore-OpenAPIClientCore.yaml @@ -0,0 +1,8 @@ +generatorName: csharp-netcore +outputDir: samples/client/petstore/csharp-netcore/OpenAPIClientCore +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/csharp-netcore +additionalProperties: + packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' + targetFramework: netcoreapp2.0 + useCompareNetObjects: "true" diff --git a/bin/configs/dart-jaguar-openapi-flutter.yaml b/bin/configs/dart-jaguar-openapi-flutter.yaml new file mode 100644 index 0000000000..caa3df92d3 --- /dev/null +++ b/bin/configs/dart-jaguar-openapi-flutter.yaml @@ -0,0 +1,7 @@ +generatorName: dart-jaguar +outputDir: samples/client/petstore/dart-jaguar/flutter_petstore/openapi +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/dart-jaguar +additionalProperties: + pubName: openapi + hideGenerationTimestamp: "true" diff --git a/bin/configs/dart-jaguar-openapi-flutter_proto.yaml b/bin/configs/dart-jaguar-openapi-flutter_proto.yaml new file mode 100644 index 0000000000..6b94b64109 --- /dev/null +++ b/bin/configs/dart-jaguar-openapi-flutter_proto.yaml @@ -0,0 +1,8 @@ +generatorName: dart-jaguar +outputDir: samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml +templateDir: modules/openapi-generator/src/main/resources/dart-jaguar +additionalProperties: + serialization: proto + pubName: openapi + hideGenerationTimestamp: "true" diff --git a/bin/configs/dart-jaguar-openapi.yaml b/bin/configs/dart-jaguar-openapi.yaml new file mode 100644 index 0000000000..effa1bf376 --- /dev/null +++ b/bin/configs/dart-jaguar-openapi.yaml @@ -0,0 +1,7 @@ +generatorName: dart-jaguar +outputDir: samples/client/petstore/dart-jaguar/openapi +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/dart-jaguar +additionalProperties: + hideGenerationTimestamp: "true" + pubName: openapi diff --git a/bin/configs/dart-jaguar-openapi_proto.yaml b/bin/configs/dart-jaguar-openapi_proto.yaml new file mode 100644 index 0000000000..1229c190d2 --- /dev/null +++ b/bin/configs/dart-jaguar-openapi_proto.yaml @@ -0,0 +1,8 @@ +generatorName: dart-jaguar +outputDir: samples/client/petstore/dart-jaguar/openapi_proto +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml +templateDir: modules/openapi-generator/src/main/resources/dart-jaguar +additionalProperties: + serialization: proto + pubName: openapi + hideGenerationTimestamp: "true" diff --git a/bin/configs/dart-openapi-browser-client.yaml b/bin/configs/dart-openapi-browser-client.yaml new file mode 100644 index 0000000000..4d3084d6c8 --- /dev/null +++ b/bin/configs/dart-openapi-browser-client.yaml @@ -0,0 +1,8 @@ +generatorName: dart +outputDir: samples/client/petstore/dart/openapi-browser-client +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/dart +additionalProperties: + supportDart2: "false" + hideGenerationTimestamp: "true" + browserClient: "true" diff --git a/bin/configs/dart-openapi-flutter.yaml b/bin/configs/dart-openapi-flutter.yaml new file mode 100644 index 0000000000..fe130413bb --- /dev/null +++ b/bin/configs/dart-openapi-flutter.yaml @@ -0,0 +1,8 @@ +generatorName: dart +outputDir: samples/client/petstore/dart/flutter_petstore/openapi +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/dart +additionalProperties: + supportDart2: "false" + hideGenerationTimestamp: "true" + browserClient: "false" diff --git a/bin/configs/dart-openapi.yaml b/bin/configs/dart-openapi.yaml new file mode 100644 index 0000000000..67ee5ca688 --- /dev/null +++ b/bin/configs/dart-openapi.yaml @@ -0,0 +1,8 @@ +generatorName: dart +outputDir: samples/client/petstore/dart/openapi +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/dart +additionalProperties: + supportDart2: "false" + hideGenerationTimestamp: "true" + browserClient: "false" diff --git a/bin/configs/dart-petstore_client_lib.yaml b/bin/configs/dart-petstore_client_lib.yaml new file mode 100644 index 0000000000..861a829ac4 --- /dev/null +++ b/bin/configs/dart-petstore_client_lib.yaml @@ -0,0 +1,6 @@ +generatorName: dart +outputDir: samples/client/petstore/dart2/petstore_client_lib +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/dart2 +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/bin/configs/elixir.yaml b/bin/configs/elixir.yaml new file mode 100644 index 0000000000..6507adae5f --- /dev/null +++ b/bin/configs/elixir.yaml @@ -0,0 +1,6 @@ +generatorName: elixir +outputDir: samples/client/petstore/elixir +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/elixir +additionalProperties: + invokerPackage: OpenapiPetstore diff --git a/bin/configs/elm.yaml b/bin/configs/elm.yaml new file mode 100644 index 0000000000..b826d487dd --- /dev/null +++ b/bin/configs/elm.yaml @@ -0,0 +1,4 @@ +generatorName: elm +outputDir: samples/openapi3/client/elm +inputSpec: modules/openapi-generator/src/test/resources/3_0/elm.yaml +templateDir: modules/openapi-generator/src/main/resources/elm diff --git a/bin/configs/go-experimental-go-petstore-oas2.yaml b/bin/configs/go-experimental-go-petstore-oas2.yaml new file mode 100644 index 0000000000..64c6bfbebc --- /dev/null +++ b/bin/configs/go-experimental-go-petstore-oas2.yaml @@ -0,0 +1,6 @@ +generatorName: go-experimental +outputDir: samples/client/petstore/go-experimental/go-petstore +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/go-experimental +additionalProperties: + packageName: petstore diff --git a/bin/configs/go-experimental-go-petstore.yaml b/bin/configs/go-experimental-go-petstore.yaml new file mode 100644 index 0000000000..53748e4009 --- /dev/null +++ b/bin/configs/go-experimental-go-petstore.yaml @@ -0,0 +1,7 @@ +generatorName: go-experimental +outputDir: samples/openapi3/client/petstore/go-experimental/go-petstore +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +templateDir: modules/openapi-generator/src/main/resources/go-experimental +additionalProperties: + enumClassPrefix: "true" + packageName: petstore diff --git a/bin/configs/go-gin-server-go-gin-api-server.yaml b/bin/configs/go-gin-server-go-gin-api-server.yaml new file mode 100644 index 0000000000..7d9932bd14 --- /dev/null +++ b/bin/configs/go-gin-server-go-gin-api-server.yaml @@ -0,0 +1,7 @@ +generatorName: go-gin-server +outputDir: samples/server/petstore/go-gin-api-server +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/go-gin-server +additionalProperties: + hideGenerationTimestamp: "true" + packageName: petstoreserver diff --git a/bin/configs/go-petstore-oas2.yaml b/bin/configs/go-petstore-oas2.yaml new file mode 100644 index 0000000000..848899598a --- /dev/null +++ b/bin/configs/go-petstore-oas2.yaml @@ -0,0 +1,6 @@ +generatorName: go +outputDir: samples/client/petstore/go/go-petstore +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/go +additionalProperties: + packageName: petstore diff --git a/bin/configs/go-petstore-withXml.yaml b/bin/configs/go-petstore-withXml.yaml new file mode 100644 index 0000000000..f80df1e768 --- /dev/null +++ b/bin/configs/go-petstore-withXml.yaml @@ -0,0 +1,8 @@ +generatorName: go +outputDir: samples/client/petstore/go/go-petstore-withXml +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/go +additionalProperties: + packageName: petstore + withXml: "true" + withGoCodegenComment: "true" diff --git a/bin/configs/go-petstore.yaml b/bin/configs/go-petstore.yaml new file mode 100644 index 0000000000..aefc71b901 --- /dev/null +++ b/bin/configs/go-petstore.yaml @@ -0,0 +1,7 @@ +generatorName: go +outputDir: samples/openapi3/client/petstore/go/go-petstore +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/go +additionalProperties: + enumClassPrefix: "true" + packageName: petstore diff --git a/bin/configs/go-server-go-api-server.yaml b/bin/configs/go-server-go-api-server.yaml new file mode 100644 index 0000000000..6446d212a3 --- /dev/null +++ b/bin/configs/go-server-go-api-server.yaml @@ -0,0 +1,7 @@ +generatorName: go-server +outputDir: samples/server/petstore/go-api-server +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/go-server +additionalProperties: + hideGenerationTimestamp: "true" + packageName: petstoreserver diff --git a/bin/configs/groovy.yaml b/bin/configs/groovy.yaml new file mode 100644 index 0000000000..df745d168e --- /dev/null +++ b/bin/configs/groovy.yaml @@ -0,0 +1,6 @@ +generatorName: groovy +outputDir: samples/client/petstore/groovy +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/Groovy +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/bin/configs/haskell-http-client.yaml b/bin/configs/haskell-http-client.yaml new file mode 100644 index 0000000000..577ad437a9 --- /dev/null +++ b/bin/configs/haskell-http-client.yaml @@ -0,0 +1,4 @@ +generatorName: haskell-http-client +outputDir: samples/client/petstore/haskell-http-client +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/haskell-http-client diff --git a/bin/configs/java-feign10x.yaml b/bin/configs/java-feign10x.yaml new file mode 100644 index 0000000000..4d741daac2 --- /dev/null +++ b/bin/configs/java-feign10x.yaml @@ -0,0 +1,9 @@ +generatorName: java +outputDir: samples/client/petstore/java/feign10x +library: feign +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + booleanGetterPrefix: is + artifactId: petstore-feign-10x + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-google-api-client.yaml b/bin/configs/java-google-api-client.yaml new file mode 100644 index 0000000000..7fed4f4fd3 --- /dev/null +++ b/bin/configs/java-google-api-client.yaml @@ -0,0 +1,8 @@ +generatorName: java +outputDir: samples/client/petstore/java/google-api-client +library: google-api-client +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: petstore-google-api-client + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-jersey1.yaml b/bin/configs/java-jersey1.yaml new file mode 100644 index 0000000000..26cf1f0e5c --- /dev/null +++ b/bin/configs/java-jersey1.yaml @@ -0,0 +1,8 @@ +generatorName: java +outputDir: samples/client/petstore/java/jersey1 +library: jersey1 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + hideGenerationTimestamp: "true" + artifactId: petstore-java-client-jersey1 diff --git a/bin/configs/java-jersey2-8-oas2.yaml b/bin/configs/java-jersey2-8-oas2.yaml new file mode 100644 index 0000000000..0e360085a9 --- /dev/null +++ b/bin/configs/java-jersey2-8-oas2.yaml @@ -0,0 +1,9 @@ +generatorName: java +outputDir: samples/client/petstore/java/jersey2-java8 +library: jersey2 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + artifactId: petstore-jersey2-java8 + hideGenerationTimestamp: "true" + serverPort: "8082" + dateLibrary: java8 diff --git a/bin/configs/java-jersey2-8.yaml b/bin/configs/java-jersey2-8.yaml new file mode 100644 index 0000000000..ec636e75cb --- /dev/null +++ b/bin/configs/java-jersey2-8.yaml @@ -0,0 +1,9 @@ +generatorName: java +outputDir: samples/openapi3/client/petstore/java/jersey2-java8 +library: jersey2 +inputSpec: modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +additionalProperties: + artifactId: petstore-openapi3-jersey2-java8 + hideGenerationTimestamp: "true" + serverPort: "8082" + dateLibrary: java8 diff --git a/bin/configs/java-microprofile-rest-client.yaml b/bin/configs/java-microprofile-rest-client.yaml new file mode 100644 index 0000000000..07c1fe806b --- /dev/null +++ b/bin/configs/java-microprofile-rest-client.yaml @@ -0,0 +1,6 @@ +generatorName: java +outputDir: samples/client/petstore/java/microprofile-rest-client +library: microprofile +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + artifactId: microprofile-rest-client diff --git a/bin/configs/java-msf4j.yaml b/bin/configs/java-msf4j.yaml new file mode 100644 index 0000000000..71c5d117d8 --- /dev/null +++ b/bin/configs/java-msf4j.yaml @@ -0,0 +1,7 @@ +generatorName: java-msf4j +outputDir: samples/server/petstore/java-msf4j +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/java-msf4j-server +additionalProperties: + hideGenerationTimestamp: "true" + artifactId: java-msf4j-server diff --git a/bin/configs/java-native.yaml b/bin/configs/java-native.yaml new file mode 100644 index 0000000000..1425976525 --- /dev/null +++ b/bin/configs/java-native.yaml @@ -0,0 +1,8 @@ +generatorName: java +outputDir: samples/client/petstore/java/native +library: native +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: petstore-native + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-okhttp-gson-parcelableModel.yaml b/bin/configs/java-okhttp-gson-parcelableModel.yaml new file mode 100644 index 0000000000..c9cbb2008b --- /dev/null +++ b/bin/configs/java-okhttp-gson-parcelableModel.yaml @@ -0,0 +1,9 @@ +generatorName: java +outputDir: samples/client/petstore/java/okhttp-gson-parcelableModel +library: okhttp-gson +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + parcelableModel: "true" + artifactId: petstore-okhttp-gson-parcelableModel + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-okhttp-gson.yaml b/bin/configs/java-okhttp-gson.yaml new file mode 100644 index 0000000000..c71c509aa2 --- /dev/null +++ b/bin/configs/java-okhttp-gson.yaml @@ -0,0 +1,8 @@ +generatorName: java +outputDir: samples/client/petstore/java/okhttp-gson +library: okhttp-gson +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: petstore-okhttp-gson + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-play-framework-api-package-override.yaml b/bin/configs/java-play-framework-api-package-override.yaml new file mode 100644 index 0000000000..93b1d8f178 --- /dev/null +++ b/bin/configs/java-play-framework-api-package-override.yaml @@ -0,0 +1,7 @@ +generatorName: java-play-framework +outputDir: samples/server/petstore/java-play-framework-api-package-override +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaPlayFramework +additionalProperties: + hideGenerationTimestamp: "true" + apiPackage: com.puppies.store.apis diff --git a/bin/configs/java-play-framework-async.yaml b/bin/configs/java-play-framework-async.yaml new file mode 100644 index 0000000000..0cf9d1bca2 --- /dev/null +++ b/bin/configs/java-play-framework-async.yaml @@ -0,0 +1,7 @@ +generatorName: java-play-framework +outputDir: samples/server/petstore/java-play-framework-async +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaPlayFramework +additionalProperties: + supportAsync: true + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-play-framework-controller-only.yaml b/bin/configs/java-play-framework-controller-only.yaml new file mode 100644 index 0000000000..8c4ceb8afa --- /dev/null +++ b/bin/configs/java-play-framework-controller-only.yaml @@ -0,0 +1,7 @@ +generatorName: java-play-framework +outputDir: samples/server/petstore/java-play-framework-controller-only +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaPlayFramework +additionalProperties: + controllerOnly: "true" + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-play-framework-fake-endpoints.yaml b/bin/configs/java-play-framework-fake-endpoints.yaml new file mode 100644 index 0000000000..7ab4bb9556 --- /dev/null +++ b/bin/configs/java-play-framework-fake-endpoints.yaml @@ -0,0 +1,6 @@ +generatorName: java-play-framework +outputDir: samples/server/petstore/java-play-framework-fake-endpoints +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaPlayFramework +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-play-framework-no-bean-validation.yaml b/bin/configs/java-play-framework-no-bean-validation.yaml new file mode 100644 index 0000000000..22614f20d8 --- /dev/null +++ b/bin/configs/java-play-framework-no-bean-validation.yaml @@ -0,0 +1,7 @@ +generatorName: java-play-framework +outputDir: samples/server/petstore/java-play-framework-no-bean-validation +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaPlayFramework +additionalProperties: + hideGenerationTimestamp: "true" + useBeanValidation: "false" diff --git a/bin/configs/java-play-framework-no-exception-handling.yaml b/bin/configs/java-play-framework-no-exception-handling.yaml new file mode 100644 index 0000000000..f231fbb960 --- /dev/null +++ b/bin/configs/java-play-framework-no-exception-handling.yaml @@ -0,0 +1,7 @@ +generatorName: java-play-framework +outputDir: samples/server/petstore/java-play-framework-no-exception-handling +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaPlayFramework +additionalProperties: + handleExceptions: "false" + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-play-framework-no-interface.yaml b/bin/configs/java-play-framework-no-interface.yaml new file mode 100644 index 0000000000..51633c13dc --- /dev/null +++ b/bin/configs/java-play-framework-no-interface.yaml @@ -0,0 +1,7 @@ +generatorName: java-play-framework +outputDir: samples/server/petstore/java-play-framework-no-interface +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaPlayFramework +additionalProperties: + hideGenerationTimestamp: "true" + useInterfaces: "false" diff --git a/bin/configs/java-play-framework-no-swagger-ui.yaml b/bin/configs/java-play-framework-no-swagger-ui.yaml new file mode 100644 index 0000000000..b2cb39224b --- /dev/null +++ b/bin/configs/java-play-framework-no-swagger-ui.yaml @@ -0,0 +1,7 @@ +generatorName: java-play-framework +outputDir: samples/server/petstore/java-play-framework-no-swagger-ui +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaPlayFramework +additionalProperties: + hideGenerationTimestamp: "true" + useSwaggerUI: "false" diff --git a/bin/configs/java-play-framework-no-wrap-calls.yaml b/bin/configs/java-play-framework-no-wrap-calls.yaml new file mode 100644 index 0000000000..d8ab5013bd --- /dev/null +++ b/bin/configs/java-play-framework-no-wrap-calls.yaml @@ -0,0 +1,7 @@ +generatorName: java-play-framework +outputDir: samples/server/petstore/java-play-framework-no-wrap-calls +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaPlayFramework +additionalProperties: + hideGenerationTimestamp: "true" + wrapCalls: "false" diff --git a/bin/configs/java-play-framework.yaml b/bin/configs/java-play-framework.yaml new file mode 100644 index 0000000000..ee9b270527 --- /dev/null +++ b/bin/configs/java-play-framework.yaml @@ -0,0 +1,6 @@ +generatorName: java-play-framework +outputDir: samples/server/petstore/java-play-framework +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaPlayFramework +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-rest-assured-jackson.yaml b/bin/configs/java-rest-assured-jackson.yaml new file mode 100644 index 0000000000..db2014be02 --- /dev/null +++ b/bin/configs/java-rest-assured-jackson.yaml @@ -0,0 +1,14 @@ +generatorName: java +outputDir: ./samples/client/petstore/java/rest-assured-jackson +library: rest-assured +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + serializationLibrary: jackson + dateLibrary: java8 + performBeanValidation: "true" + java8: "true" + useBeanValidation: "true" + booleanGetterPrefix: is + artifactId: petstore-rest-assured-jackson + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-rest-assured.yaml b/bin/configs/java-rest-assured.yaml new file mode 100644 index 0000000000..39426761ef --- /dev/null +++ b/bin/configs/java-rest-assured.yaml @@ -0,0 +1,11 @@ +generatorName: java +outputDir: samples/client/petstore/java/rest-assured +library: rest-assured +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + performBeanValidation: "true" + useBeanValidation: "true" + booleanGetterPrefix: is + artifactId: petstore-rest-assured + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-resteasy.yaml b/bin/configs/java-resteasy.yaml new file mode 100644 index 0000000000..26776e8f08 --- /dev/null +++ b/bin/configs/java-resteasy.yaml @@ -0,0 +1,7 @@ +generatorName: java +outputDir: samples/client/petstore/java/resteasy +library: resteasy +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + artifactId: petstore-resteasy + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-resttemplate-withXml.yaml b/bin/configs/java-resttemplate-withXml.yaml new file mode 100644 index 0000000000..0307a58326 --- /dev/null +++ b/bin/configs/java-resttemplate-withXml.yaml @@ -0,0 +1,8 @@ +generatorName: java +outputDir: samples/client/petstore/java/resttemplate-withXml +library: resttemplate +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + withXml: "true" + artifactId: petstore-resttemplate-withxml + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-resttemplate.yaml b/bin/configs/java-resttemplate.yaml new file mode 100644 index 0000000000..4bbfa2f688 --- /dev/null +++ b/bin/configs/java-resttemplate.yaml @@ -0,0 +1,7 @@ +generatorName: java +outputDir: samples/client/petstore/java/resttemplate +library: resttemplate +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + artifactId: petstore-resttemplate + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-retrofit2-play24.yaml b/bin/configs/java-retrofit2-play24.yaml new file mode 100644 index 0000000000..aa1bfb5b75 --- /dev/null +++ b/bin/configs/java-retrofit2-play24.yaml @@ -0,0 +1,12 @@ +generatorName: java +outputDir: samples/client/petstore/java/retrofit2-play24 +library: retrofit2 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + usePlayWS: "true" + enableBuilderSupport: "true" + useBeanValidation: "true" + playVersion: play24 + artifactId: petstore-java-client-retrofit2-play24 + hideGenerationTimestamp: "true" + dateLibrary: java8 diff --git a/bin/configs/java-retrofit2-play25.yaml b/bin/configs/java-retrofit2-play25.yaml new file mode 100644 index 0000000000..49cfe3d0c7 --- /dev/null +++ b/bin/configs/java-retrofit2-play25.yaml @@ -0,0 +1,11 @@ +generatorName: java +outputDir: samples/client/petstore/java/retrofit2-play25 +library: retrofit2 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + usePlayWS: "true" + enableBuilderSupport: "true" + useBeanValidation: "true" + playVersion: play25 + artifactId: petstore-java-client-retrofit2-play25 + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-retrofit2-play26.yaml b/bin/configs/java-retrofit2-play26.yaml new file mode 100644 index 0000000000..5fe367fb79 --- /dev/null +++ b/bin/configs/java-retrofit2-play26.yaml @@ -0,0 +1,11 @@ +generatorName: java +outputDir: samples/client/petstore/java/retrofit2-play26 +library: retrofit2 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + usePlayWS: "true" + enableBuilderSupport: "true" + useBeanValidation: "true" + playVersion: play26 + artifactId: petstore-java-client-retrofit2-play26 + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-retrofit2.yaml b/bin/configs/java-retrofit2.yaml new file mode 100644 index 0000000000..2879e3e449 --- /dev/null +++ b/bin/configs/java-retrofit2.yaml @@ -0,0 +1,8 @@ +generatorName: java +outputDir: samples/client/petstore/java/retrofit2 +library: retrofit2 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: petstore-retrofit2 + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-retrofit2rx.yaml b/bin/configs/java-retrofit2rx.yaml new file mode 100644 index 0000000000..2f84144f78 --- /dev/null +++ b/bin/configs/java-retrofit2rx.yaml @@ -0,0 +1,9 @@ +generatorName: java +outputDir: samples/client/petstore/java/retrofit2rx +library: retrofit2 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + useRxJava: "true" + artifactId: petstore-retrofit2-rx + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-retrofit2rx2.yaml b/bin/configs/java-retrofit2rx2.yaml new file mode 100644 index 0000000000..dfb55acb48 --- /dev/null +++ b/bin/configs/java-retrofit2rx2.yaml @@ -0,0 +1,9 @@ +generatorName: java +outputDir: samples/client/petstore/java/retrofit2rx2 +library: retrofit2 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + useRxJava2: "true" + artifactId: petstore-retrofit2-rx2 + hideGenerationTimestamp: "true" diff --git a/bin/configs/java-vertx.yaml b/bin/configs/java-vertx.yaml new file mode 100644 index 0000000000..cf019b5da8 --- /dev/null +++ b/bin/configs/java-vertx.yaml @@ -0,0 +1,9 @@ +generatorName: java +outputDir: samples/client/petstore/java/vertx +library: vertx +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: petstore-vertx + hideGenerationTimestamp: "true" + dateLibrary: java8 diff --git a/bin/configs/java-webclient.yaml b/bin/configs/java-webclient.yaml new file mode 100644 index 0000000000..dafc9835f2 --- /dev/null +++ b/bin/configs/java-webclient.yaml @@ -0,0 +1,7 @@ +generatorName: java +outputDir: samples/client/petstore/java/webclient +library: webclient +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + artifactId: petstore-webclient + hideGenerationTimestamp: "true" diff --git a/bin/configs/javascript-es6.yaml b/bin/configs/javascript-es6.yaml new file mode 100644 index 0000000000..08a49e7935 --- /dev/null +++ b/bin/configs/javascript-es6.yaml @@ -0,0 +1,6 @@ +generatorName: javascript +outputDir: samples/client/petstore/javascript-es6 +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/Javascript/es6 +additionalProperties: + appName: PetstoreClient diff --git a/bin/configs/javascript-promise-es6.yaml b/bin/configs/javascript-promise-es6.yaml new file mode 100644 index 0000000000..c21b9c1376 --- /dev/null +++ b/bin/configs/javascript-promise-es6.yaml @@ -0,0 +1,7 @@ +generatorName: javascript +outputDir: samples/client/petstore/javascript-promise-es6 +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/Javascript/es6 +additionalProperties: + usePromises: "true" + appName: PetstoreClient diff --git a/bin/configs/jaxrs-cxf-annotated-base-path.yaml b/bin/configs/jaxrs-cxf-annotated-base-path.yaml new file mode 100644 index 0000000000..ddff8105f2 --- /dev/null +++ b/bin/configs/jaxrs-cxf-annotated-base-path.yaml @@ -0,0 +1,9 @@ +generatorName: jaxrs-cxf +outputDir: samples/server/petstore/jaxrs-cxf-annotated-base-path +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/cxf +additionalProperties: + artifactId: cxf-annotated-basepath + hideGenerationTimestamp: "true" + serverPort: "8082" + useAnnotatedBasePath: "true" diff --git a/bin/configs/jaxrs-cxf-cdi.yaml b/bin/configs/jaxrs-cxf-cdi.yaml new file mode 100644 index 0000000000..59b8fc8c33 --- /dev/null +++ b/bin/configs/jaxrs-cxf-cdi.yaml @@ -0,0 +1,6 @@ +generatorName: jaxrs-cxf-cdi +outputDir: samples/server/petstore/jaxrs-cxf-cdi +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/bin/configs/jaxrs-cxf-non-spring-app.yaml b/bin/configs/jaxrs-cxf-non-spring-app.yaml new file mode 100644 index 0000000000..b1f09c1081 --- /dev/null +++ b/bin/configs/jaxrs-cxf-non-spring-app.yaml @@ -0,0 +1,9 @@ +generatorName: jaxrs-cxf +outputDir: samples/server/petstore/jaxrs-cxf-non-spring-app +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/cxf +additionalProperties: + artifactId: cxf-server-non-spring + hideGenerationTimestamp: "true" + generateNonSpringApplication: "true" + serverPort: "8082" diff --git a/bin/configs/jaxrs-cxf.yaml b/bin/configs/jaxrs-cxf.yaml new file mode 100644 index 0000000000..81988d2576 --- /dev/null +++ b/bin/configs/jaxrs-cxf.yaml @@ -0,0 +1,7 @@ +generatorName: jaxrs-cxf +outputDir: samples/server/petstore/jaxrs-cxf +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/cxf +additionalProperties: + hideGenerationTimestamp: "true" + serverPort: "8082" diff --git a/bin/configs/jaxrs-jersey-jaxrs-datelib-j8.yaml b/bin/configs/jaxrs-jersey-jaxrs-datelib-j8.yaml new file mode 100644 index 0000000000..902a8abae0 --- /dev/null +++ b/bin/configs/jaxrs-jersey-jaxrs-datelib-j8.yaml @@ -0,0 +1,12 @@ +generatorName: jaxrs-jersey +outputDir: samples/server/petstore/jaxrs-datelib-j8 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS +additionalProperties: + serializableModel: true + withXml: true + java8: true + useBeanValidation: true + hideGenerationTimestamp: "true" + serverPort: "8082" + dateLibrary: java8 diff --git a/bin/configs/jaxrs-jersey-jersey1-useTags.yaml b/bin/configs/jaxrs-jersey-jersey1-useTags.yaml new file mode 100644 index 0000000000..98c76c0e45 --- /dev/null +++ b/bin/configs/jaxrs-jersey-jersey1-useTags.yaml @@ -0,0 +1,10 @@ +generatorName: jaxrs-jersey +outputDir: samples/server/petstore/jaxrs/jersey1-useTags +library: jersey1 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS +additionalProperties: + artifactId: jaxrs-jersey1-useTags + hideGenerationTimestamp: "true" + serverPort: "8082" + useTags: "true" diff --git a/bin/configs/jaxrs-jersey-jersey1.yaml b/bin/configs/jaxrs-jersey-jersey1.yaml new file mode 100644 index 0000000000..8df27c59be --- /dev/null +++ b/bin/configs/jaxrs-jersey-jersey1.yaml @@ -0,0 +1,9 @@ +generatorName: jaxrs-jersey +outputDir: samples/server/petstore/jaxrs/jersey1 +library: jersey1 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS +additionalProperties: + artifactId: jaxrs-jersey1-server + hideGenerationTimestamp: "true" + serverPort: "8082" diff --git a/bin/configs/jaxrs-jersey-jersey2-useTags.yaml b/bin/configs/jaxrs-jersey-jersey2-useTags.yaml new file mode 100644 index 0000000000..8a2d89b02f --- /dev/null +++ b/bin/configs/jaxrs-jersey-jersey2-useTags.yaml @@ -0,0 +1,9 @@ +generatorName: jaxrs-jersey +outputDir: samples/server/petstore/jaxrs/jersey2-useTags +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS +additionalProperties: + artifactId: jaxrs-jersey2-useTags + hideGenerationTimestamp: "true" + serverPort: "8082" + useTags: "true" diff --git a/bin/configs/jaxrs-jersey-jersey2.yaml b/bin/configs/jaxrs-jersey-jersey2.yaml new file mode 100644 index 0000000000..8345db9f39 --- /dev/null +++ b/bin/configs/jaxrs-jersey-jersey2.yaml @@ -0,0 +1,8 @@ +generatorName: jaxrs-jersey +outputDir: samples/server/petstore/jaxrs/jersey2 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS +additionalProperties: + artifactId: jaxrs-jersey-petstore-server + hideGenerationTimestamp: "true" + serverPort: "8082" diff --git a/bin/configs/jaxrs-jersey.yaml b/bin/configs/jaxrs-jersey.yaml new file mode 100644 index 0000000000..81328a6de1 --- /dev/null +++ b/bin/configs/jaxrs-jersey.yaml @@ -0,0 +1,8 @@ +generatorName: jaxrs-jersey +outputDir: samples/server/petstore/jaxrs-jersey +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS +additionalProperties: + artifactId: openapiv3-jaxrs-jersey-petstore-server + hideGenerationTimestamp: "true" + serverPort: "8080" diff --git a/bin/configs/jaxrs-resteasy-default.yaml b/bin/configs/jaxrs-resteasy-default.yaml new file mode 100644 index 0000000000..3fd9e38fb2 --- /dev/null +++ b/bin/configs/jaxrs-resteasy-default.yaml @@ -0,0 +1,6 @@ +generatorName: jaxrs-resteasy +outputDir: samples/server/petstore/jaxrs-resteasy/default +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/bin/configs/jaxrs-resteasy-eap-eap-java8.yaml b/bin/configs/jaxrs-resteasy-eap-eap-java8.yaml new file mode 100644 index 0000000000..3315b6e1a0 --- /dev/null +++ b/bin/configs/jaxrs-resteasy-eap-eap-java8.yaml @@ -0,0 +1,8 @@ +generatorName: jaxrs-resteasy-eap +outputDir: samples/server/petstore/jaxrs-resteasy/eap-java8 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap +additionalProperties: + artifactId: jaxrs-resteasy-eap-java8-server + hideGenerationTimestamp: "true" + dateLibrary: java8 diff --git a/bin/configs/jaxrs-resteasy-eap-eap-joda.yaml b/bin/configs/jaxrs-resteasy-eap-eap-joda.yaml new file mode 100644 index 0000000000..a985b866cd --- /dev/null +++ b/bin/configs/jaxrs-resteasy-eap-eap-joda.yaml @@ -0,0 +1,8 @@ +generatorName: jaxrs-resteasy-eap +outputDir: samples/server/petstore/jaxrs-resteasy/eap-joda +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap +additionalProperties: + artifactId: jaxrs-resteasy-eap-joda-server + hideGenerationTimestamp: "true" + dateLibrary: joda diff --git a/bin/configs/jaxrs-resteasy-eap-eap.yaml b/bin/configs/jaxrs-resteasy-eap-eap.yaml new file mode 100644 index 0000000000..5f776839ca --- /dev/null +++ b/bin/configs/jaxrs-resteasy-eap-eap.yaml @@ -0,0 +1,6 @@ +generatorName: jaxrs-resteasy-eap +outputDir: samples/server/petstore/jaxrs-resteasy/eap +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/bin/configs/jaxrs-resteasy-joda.yaml b/bin/configs/jaxrs-resteasy-joda.yaml new file mode 100644 index 0000000000..13fb6b8b67 --- /dev/null +++ b/bin/configs/jaxrs-resteasy-joda.yaml @@ -0,0 +1,8 @@ +generatorName: jaxrs-resteasy +outputDir: samples/server/petstore/jaxrs-resteasy/joda +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy +additionalProperties: + artifactId: jaxrs-resteasy-joda-server + hideGenerationTimestamp: "true" + dateLibrary: joda diff --git a/bin/configs/jaxrs-spec-interface.yaml b/bin/configs/jaxrs-spec-interface.yaml new file mode 100644 index 0000000000..2c0b68c410 --- /dev/null +++ b/bin/configs/jaxrs-spec-interface.yaml @@ -0,0 +1,8 @@ +generatorName: jaxrs-spec +outputDir: samples/server/petstore/jaxrs-spec-interface +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + artifactId: jaxrs-spec-interface-petstore-server + interfaceOnly: "true" + serializableModel: "true" + hideGenerationTimestamp: "true" diff --git a/bin/configs/jaxrs-spec.yaml b/bin/configs/jaxrs-spec.yaml new file mode 100644 index 0000000000..df44fac371 --- /dev/null +++ b/bin/configs/jaxrs-spec.yaml @@ -0,0 +1,7 @@ +generatorName: jaxrs-spec +outputDir: samples/server/petstore/jaxrs-spec +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + artifactId: jaxrs-spec-petstore-server + serializableModel: "true" + hideGenerationTimestamp: "true" diff --git a/bin/configs/kotlin-gson.yaml b/bin/configs/kotlin-gson.yaml new file mode 100644 index 0000000000..e4e5568950 --- /dev/null +++ b/bin/configs/kotlin-gson.yaml @@ -0,0 +1,7 @@ +generatorName: kotlin +outputDir: samples/client/petstore/kotlin-gson +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + serializationLibrary: gson + artifactId: kotlin-petstore-gson diff --git a/bin/configs/kotlin-jackson.yaml b/bin/configs/kotlin-jackson.yaml new file mode 100644 index 0000000000..2d37a29f38 --- /dev/null +++ b/bin/configs/kotlin-jackson.yaml @@ -0,0 +1,8 @@ +generatorName: kotlin +outputDir: samples/client/petstore/kotlin-jackson +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + serializationLibrary: jackson + artifactId: kotlin-petstore-jackson + enumPropertyNaming: UPPERCASE diff --git a/bin/configs/kotlin-json-request-string.yaml b/bin/configs/kotlin-json-request-string.yaml new file mode 100644 index 0000000000..8f1dade28c --- /dev/null +++ b/bin/configs/kotlin-json-request-string.yaml @@ -0,0 +1,7 @@ +generatorName: kotlin +outputDir: samples/client/petstore/kotlin-json-request-string +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-date-field.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + requestDateConverter: toString + artifactId: kotlin-petstore-json-request-string diff --git a/bin/configs/kotlin-jvm-okhttp3-okhttp3.yaml b/bin/configs/kotlin-jvm-okhttp3-okhttp3.yaml new file mode 100644 index 0000000000..f8be34a2f0 --- /dev/null +++ b/bin/configs/kotlin-jvm-okhttp3-okhttp3.yaml @@ -0,0 +1,7 @@ +generatorName: kotlin +outputDir: samples/client/petstore/kotlin-okhttp3 +library: jvm-okhttp3 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + artifactId: kotlin-petstore-okhttp3 diff --git a/bin/configs/kotlin-jvm-okhttp4-coroutines.yaml b/bin/configs/kotlin-jvm-okhttp4-coroutines.yaml new file mode 100644 index 0000000000..0718c164d5 --- /dev/null +++ b/bin/configs/kotlin-jvm-okhttp4-coroutines.yaml @@ -0,0 +1,11 @@ +generatorName: kotlin +outputDir: samples/client/petstore/kotlin-jvm-okhttp4-coroutines +library: jvm-okhttp4 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + serializationLibrary: gson + useCoroutines: "true" + artifactId: kotlin-petstore-okhttp4-coroutines-client + serializableModel: "true" + dateLibrary: java8 diff --git a/bin/configs/kotlin-jvm-retrofit2-retrofit2.yaml b/bin/configs/kotlin-jvm-retrofit2-retrofit2.yaml new file mode 100644 index 0000000000..0729bf8ecd --- /dev/null +++ b/bin/configs/kotlin-jvm-retrofit2-retrofit2.yaml @@ -0,0 +1,7 @@ +generatorName: kotlin +outputDir: samples/client/petstore/kotlin-retrofit2 +library: jvm-retrofit2 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + artifactId: kotlin-petstore-retrofit2 diff --git a/bin/configs/kotlin-moshi-codegen.yaml b/bin/configs/kotlin-moshi-codegen.yaml new file mode 100644 index 0000000000..00536bbf1c --- /dev/null +++ b/bin/configs/kotlin-moshi-codegen.yaml @@ -0,0 +1,8 @@ +generatorName: kotlin +outputDir: samples/client/petstore/kotlin-moshi-codegen +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + serializationLibrary: moshi + artifactId: kotlin-petstore-moshi-codegen + moshiCodeGen: "true" diff --git a/bin/configs/kotlin-multiplatform.yaml b/bin/configs/kotlin-multiplatform.yaml new file mode 100644 index 0000000000..ba50f38f67 --- /dev/null +++ b/bin/configs/kotlin-multiplatform.yaml @@ -0,0 +1,7 @@ +generatorName: kotlin +outputDir: samples/client/petstore/kotlin-multiplatform +library: multiplatform +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + artifactId: kotlin-client-petstore-multiplatform diff --git a/bin/configs/kotlin-nonpublic.yaml b/bin/configs/kotlin-nonpublic.yaml new file mode 100644 index 0000000000..fbc64ceb00 --- /dev/null +++ b/bin/configs/kotlin-nonpublic.yaml @@ -0,0 +1,7 @@ +generatorName: kotlin +outputDir: samples/client/petstore/kotlin-nonpublic +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + nonPublicApi: "true" + artifactId: kotlin-petstore-nonpublic diff --git a/bin/configs/kotlin-nullable.yaml b/bin/configs/kotlin-nullable.yaml new file mode 100644 index 0000000000..27fe5c6b0d --- /dev/null +++ b/bin/configs/kotlin-nullable.yaml @@ -0,0 +1,8 @@ +generatorName: kotlin +outputDir: samples/client/petstore/kotlin-nullable +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + artifactId: kotlin-petstore-nullable + serializableModel: "true" + nullableReturnType: "true" diff --git a/bin/configs/kotlin-server-ktor.yaml b/bin/configs/kotlin-server-ktor.yaml new file mode 100644 index 0000000000..ad5bce1047 --- /dev/null +++ b/bin/configs/kotlin-server-ktor.yaml @@ -0,0 +1,8 @@ +generatorName: kotlin-server +outputDir: samples/server/petstore/kotlin-server/ktor +library: ktor +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-server +additionalProperties: + hideGenerationTimestamp: "true" + serializableModel: "true" diff --git a/bin/configs/kotlin-spring-boot-reactive.yaml b/bin/configs/kotlin-spring-boot-reactive.yaml new file mode 100644 index 0000000000..4730069192 --- /dev/null +++ b/bin/configs/kotlin-spring-boot-reactive.yaml @@ -0,0 +1,10 @@ +generatorName: kotlin-spring +outputDir: samples/server/petstore/kotlin-springboot-reactive +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-spring +additionalProperties: + serviceImplementation: "true" + library: spring-boot + reactive: "true" + swaggerAnnotations: "true" + beanValidations: "true" diff --git a/bin/configs/kotlin-spring-boot.yaml b/bin/configs/kotlin-spring-boot.yaml new file mode 100644 index 0000000000..df44a4dfb5 --- /dev/null +++ b/bin/configs/kotlin-spring-boot.yaml @@ -0,0 +1,10 @@ +generatorName: kotlin-spring +outputDir: samples/server/petstore/kotlin-springboot +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-spring +additionalProperties: + serviceImplementation: "true" + library: spring-boot + serializableModel: "true" + swaggerAnnotations: "true" + beanValidations: "true" diff --git a/bin/configs/kotlin-string.yaml b/bin/configs/kotlin-string.yaml new file mode 100644 index 0000000000..e6cd63e4b4 --- /dev/null +++ b/bin/configs/kotlin-string.yaml @@ -0,0 +1,10 @@ +generatorName: kotlin +outputDir: samples/client/petstore/kotlin-string +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + artifactId: kotlin-petstore-string + serializableModel: "true" + sortModelPropertiesByRequiredFlag: "false" + sortParamsByRequiredFlag: "false" + dateLibrary: string diff --git a/bin/configs/kotlin-threetenbp.yaml b/bin/configs/kotlin-threetenbp.yaml new file mode 100644 index 0000000000..02c900e8e0 --- /dev/null +++ b/bin/configs/kotlin-threetenbp.yaml @@ -0,0 +1,7 @@ +generatorName: kotlin +outputDir: samples/client/petstore/kotlin-threetenbp +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + artifactId: kotlin-petstore-threetenbp + dateLibrary: threetenbp diff --git a/bin/configs/kotlin.yaml b/bin/configs/kotlin.yaml new file mode 100644 index 0000000000..136fff6480 --- /dev/null +++ b/bin/configs/kotlin.yaml @@ -0,0 +1,8 @@ +generatorName: kotlin +outputDir: samples/client/petstore/kotlin +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + artifactId: kotlin-petstore-client + serializableModel: "true" + dateLibrary: java8 diff --git a/bin/configs/lua.yaml b/bin/configs/lua.yaml new file mode 100644 index 0000000000..280cf32e74 --- /dev/null +++ b/bin/configs/lua.yaml @@ -0,0 +1,6 @@ +generatorName: lua +outputDir: samples/client/petstore/lua +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/lua +additionalProperties: + packageName: petstore diff --git a/bin/configs/mysql-schema-mysql.yaml b/bin/configs/mysql-schema-mysql.yaml new file mode 100644 index 0000000000..4a4811ae10 --- /dev/null +++ b/bin/configs/mysql-schema-mysql.yaml @@ -0,0 +1,4 @@ +generatorName: mysql-schema +outputDir: samples/schema/petstore/mysql +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/mysql-schema diff --git a/bin/configs/nim.yaml b/bin/configs/nim.yaml new file mode 100644 index 0000000000..136a92764c --- /dev/null +++ b/bin/configs/nim.yaml @@ -0,0 +1,6 @@ +generatorName: nim +outputDir: samples/client/petstore/nim +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/nim-client +additionalProperties: + packageName: petstore diff --git a/bin/configs/other/ada.yaml b/bin/configs/other/ada.yaml new file mode 100644 index 0000000000..c67b9b7d3f --- /dev/null +++ b/bin/configs/other/ada.yaml @@ -0,0 +1,7 @@ +generatorName: ada +outputDir: samples/client/petstore/ada +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/Ada +additionalProperties: + modelPackage: Samples.Petstore + projectName: Petstore diff --git a/bin/configs/other/android-httpclient.yaml b/bin/configs/other/android-httpclient.yaml new file mode 100644 index 0000000000..1d5e23e227 --- /dev/null +++ b/bin/configs/other/android-httpclient.yaml @@ -0,0 +1,6 @@ +generatorName: android +outputDir: samples/client/petstore/android/httpclient +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/android +additionalProperties: + library: httpclient diff --git a/bin/configs/other/android-volley.yaml b/bin/configs/other/android-volley.yaml new file mode 100644 index 0000000000..63a3c42a46 --- /dev/null +++ b/bin/configs/other/android-volley.yaml @@ -0,0 +1,6 @@ +generatorName: android +outputDir: samples/client/petstore/android/volley +library: volley +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + artifactId: petstore-android-volley diff --git a/bin/configs/other/apache2.yaml b/bin/configs/other/apache2.yaml new file mode 100644 index 0000000000..a5b28c44e5 --- /dev/null +++ b/bin/configs/other/apache2.yaml @@ -0,0 +1,4 @@ +generatorName: apache2 +outputDir: samples/config/petstore/apache2 +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/apache2 diff --git a/bin/configs/other/asciidoc.yaml b/bin/configs/other/asciidoc.yaml new file mode 100644 index 0000000000..4d93790d87 --- /dev/null +++ b/bin/configs/other/asciidoc.yaml @@ -0,0 +1,7 @@ +generatorName: asciidoc +outputDir: samples/documentation/asciidoc +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/asciidoc-documentation +additionalProperties: + specDir: modules/openapi-generator/src/main/resources/asciidoc-documentation + snippetDir: "." diff --git a/bin/configs/other/aspnetcore-3.0.yaml b/bin/configs/other/aspnetcore-3.0.yaml new file mode 100644 index 0000000000..762013c169 --- /dev/null +++ b/bin/configs/other/aspnetcore-3.0.yaml @@ -0,0 +1,7 @@ +generatorName: aspnetcore +outputDir: samples/server/petstore/aspnetcore-3.0 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/aspnetcore/3.0 +additionalProperties: + packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}' + aspnetCoreVersion: "3.0" diff --git a/bin/configs/other/aspnetcore-3.1.yaml b/bin/configs/other/aspnetcore-3.1.yaml new file mode 100644 index 0000000000..0986677882 --- /dev/null +++ b/bin/configs/other/aspnetcore-3.1.yaml @@ -0,0 +1,7 @@ +generatorName: aspnetcore +outputDir: samples/server/petstore/aspnetcore-3.1 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/aspnetcore/3.0 +additionalProperties: + packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}' + aspnetCoreVersion: "3.1" diff --git a/bin/configs/other/aspnetcore.yaml b/bin/configs/other/aspnetcore.yaml new file mode 100644 index 0000000000..71f2659e7b --- /dev/null +++ b/bin/configs/other/aspnetcore.yaml @@ -0,0 +1,6 @@ +generatorName: aspnetcore +outputDir: samples/server/petstore/aspnetcore +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/aspnetcore/2.1 +additionalProperties: + packageGuid: '{3C799344-F285-4669-8FD5-7ED9B795D5C5}' diff --git a/bin/configs/other/avro-schema.yaml b/bin/configs/other/avro-schema.yaml new file mode 100644 index 0000000000..bf44846dc0 --- /dev/null +++ b/bin/configs/other/avro-schema.yaml @@ -0,0 +1,4 @@ +generatorName: avro-schema +outputDir: samples/openapi3/schema/petstore/avro-schema +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/avro-schema diff --git a/bin/configs/other/bash.yaml b/bin/configs/other/bash.yaml new file mode 100644 index 0000000000..4ad3369382 --- /dev/null +++ b/bin/configs/other/bash.yaml @@ -0,0 +1,14 @@ +generatorName: bash +outputDir: samples/client/petstore/bash +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/bash +additionalProperties: + generateZshCompletion: true + hostEnvironmentVariable: PETSTORE_HOST + curlOptions: -sS --tlsv1.2 + apiKeyAuthEnvironmentVariable: PETSTORE_API_KEY + processMarkdown: true + basicAuthEnvironmentVariable: PETSTORE_BASIC_AUTH + scriptName: petstore-cli + generateBashCompletion: true + hideGenerationTimestamp: "true" diff --git a/bin/configs/other/c.yaml b/bin/configs/other/c.yaml new file mode 100644 index 0000000000..f622e7919a --- /dev/null +++ b/bin/configs/other/c.yaml @@ -0,0 +1,4 @@ +generatorName: c +outputDir: samples/client/petstore/c +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/C-libcurl diff --git a/bin/configs/other/clojure.yaml b/bin/configs/other/clojure.yaml new file mode 100644 index 0000000000..a34be0c303 --- /dev/null +++ b/bin/configs/other/clojure.yaml @@ -0,0 +1,3 @@ +generatorName: clojure +outputDir: samples/client/petstore/clojure +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.json diff --git a/bin/configs/other/cpp-pistache-server-cpp-pistache.yaml b/bin/configs/other/cpp-pistache-server-cpp-pistache.yaml new file mode 100644 index 0000000000..4a0326357e --- /dev/null +++ b/bin/configs/other/cpp-pistache-server-cpp-pistache.yaml @@ -0,0 +1,7 @@ +generatorName: cpp-pistache-server +outputDir: samples/server/petstore/cpp-pistache +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/cpp-pistache-server +additionalProperties: + useStructModel: "false" + addExternalLibs: "true" diff --git a/bin/configs/other/cpp-qt5-client.yaml b/bin/configs/other/cpp-qt5-client.yaml new file mode 100644 index 0000000000..dc36141b43 --- /dev/null +++ b/bin/configs/other/cpp-qt5-client.yaml @@ -0,0 +1,7 @@ +generatorName: cpp-qt5-client +outputDir: samples/client/petstore/cpp-qt5 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/cpp-qt5-client +additionalProperties: + cppNamespace: test_namespace + modelNamePrefix: PFX diff --git a/bin/configs/other/cpp-restbed-server-cpp-restbed.yaml b/bin/configs/other/cpp-restbed-server-cpp-restbed.yaml new file mode 100644 index 0000000000..3f07a71ff0 --- /dev/null +++ b/bin/configs/other/cpp-restbed-server-cpp-restbed.yaml @@ -0,0 +1,3 @@ +generatorName: cpp-restbed-server +outputDir: samples/server/petstore/cpp-restbed +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml diff --git a/bin/configs/other/cpp-tizen.yaml b/bin/configs/other/cpp-tizen.yaml new file mode 100644 index 0000000000..5efd42127c --- /dev/null +++ b/bin/configs/other/cpp-tizen.yaml @@ -0,0 +1,4 @@ +generatorName: cpp-tizen +outputDir: samples/client/petstore/cpp-tizen +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/cpp-tizen-client diff --git a/bin/configs/other/cpp-ue4.yaml b/bin/configs/other/cpp-ue4.yaml new file mode 100644 index 0000000000..98df851e2d --- /dev/null +++ b/bin/configs/other/cpp-ue4.yaml @@ -0,0 +1,4 @@ +generatorName: cpp-ue4 +outputDir: samples/client/petstore/cpp-ue4 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/cpp-ue4 diff --git a/bin/configs/other/csharp-OpenAPIClientNet35.yaml b/bin/configs/other/csharp-OpenAPIClientNet35.yaml new file mode 100644 index 0000000000..3851feda10 --- /dev/null +++ b/bin/configs/other/csharp-OpenAPIClientNet35.yaml @@ -0,0 +1,6 @@ +generatorName: csharp +outputDir: samples/client/petstore/csharp/OpenAPIClientNet35 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + targetFramework: v3.5 + packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' diff --git a/bin/configs/other/csharp-OpenAPIClientNet40.yaml b/bin/configs/other/csharp-OpenAPIClientNet40.yaml new file mode 100644 index 0000000000..57f5cd1524 --- /dev/null +++ b/bin/configs/other/csharp-OpenAPIClientNet40.yaml @@ -0,0 +1,6 @@ +generatorName: csharp +outputDir: samples/client/petstore/csharp/OpenAPIClientNet40 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + targetFramework: v4.0 + packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' diff --git a/bin/configs/other/csharp-OpenAPIClientNetCoreProject.yaml b/bin/configs/other/csharp-OpenAPIClientNetCoreProject.yaml new file mode 100644 index 0000000000..8c41863eb0 --- /dev/null +++ b/bin/configs/other/csharp-OpenAPIClientNetCoreProject.yaml @@ -0,0 +1,7 @@ +generatorName: csharp +outputDir: samples/client/petstore/csharp/OpenAPIClientNetCoreProject +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + targetFramework: netstandard1.3 + packageGuid: '{67035b31-f8e5-41a4-9673-954035084f7d}' + netCoreProjectFile: "true" diff --git a/bin/configs/other/csharp-OpenAPIClientNetStandard.yaml b/bin/configs/other/csharp-OpenAPIClientNetStandard.yaml new file mode 100644 index 0000000000..d2398251e2 --- /dev/null +++ b/bin/configs/other/csharp-OpenAPIClientNetStandard.yaml @@ -0,0 +1,6 @@ +generatorName: csharp +outputDir: samples/client/petstore/csharp/OpenAPIClientNetStandard +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + targetFramework: netstandard1.3 + packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' diff --git a/bin/configs/other/csharp-OpenAPIClientWithPropertyChanged.yaml b/bin/configs/other/csharp-OpenAPIClientWithPropertyChanged.yaml new file mode 100644 index 0000000000..1ff167e053 --- /dev/null +++ b/bin/configs/other/csharp-OpenAPIClientWithPropertyChanged.yaml @@ -0,0 +1,7 @@ +generatorName: csharp +outputDir: samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + packageGuid: '{5CD900DE-8266-412F-A758-28E1F9C623D5}' + generatePropertyChanged: "true" + optionalEmitDefaultValues: "true" diff --git a/bin/configs/other/csharp-dotnet2-OpenAPIClient.yaml b/bin/configs/other/csharp-dotnet2-OpenAPIClient.yaml new file mode 100644 index 0000000000..76c07c772d --- /dev/null +++ b/bin/configs/other/csharp-dotnet2-OpenAPIClient.yaml @@ -0,0 +1,6 @@ +generatorName: csharp-dotnet2 +outputDir: samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/csharp-dotnet2 +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/bin/configs/other/csharp-nancyfx-nancyfx-async.yaml b/bin/configs/other/csharp-nancyfx-nancyfx-async.yaml new file mode 100644 index 0000000000..ae5e467175 --- /dev/null +++ b/bin/configs/other/csharp-nancyfx-nancyfx-async.yaml @@ -0,0 +1,7 @@ +generatorName: csharp-nancyfx +outputDir: samples/server/petstore/nancyfx-async +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/csharp-nancyfx +additionalProperties: + asyncServer: "true" + packageGuid: '{768B8DC6-54EE-4D40-9B20-7857E1D742A4}' diff --git a/bin/configs/other/csharp-nancyfx-nancyfx.yaml b/bin/configs/other/csharp-nancyfx-nancyfx.yaml new file mode 100644 index 0000000000..5fd6cdffaf --- /dev/null +++ b/bin/configs/other/csharp-nancyfx-nancyfx.yaml @@ -0,0 +1,7 @@ +generatorName: csharp-nancyfx +outputDir: samples/server/petstore/nancyfx +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/csharp-nancyfx +additionalProperties: + asyncServer: "false" + packageGuid: '{768B8DC6-54EE-4D40-9B20-7857E1D742A4}' diff --git a/bin/configs/other/cwiki.yaml b/bin/configs/other/cwiki.yaml new file mode 100644 index 0000000000..bc17eb304f --- /dev/null +++ b/bin/configs/other/cwiki.yaml @@ -0,0 +1,4 @@ +generatorName: cwiki +outputDir: samples/documentation/cwiki +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/confluenceWikiDocs diff --git a/bin/configs/other/dart-dio.yaml b/bin/configs/other/dart-dio.yaml new file mode 100644 index 0000000000..7013cbd4fa --- /dev/null +++ b/bin/configs/other/dart-dio.yaml @@ -0,0 +1,6 @@ +generatorName: dart-dio +outputDir: samples/client/petstore/dart-dio +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/dart-dio +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/bin/configs/other/dynamic-html.yaml b/bin/configs/other/dynamic-html.yaml new file mode 100644 index 0000000000..70904c511e --- /dev/null +++ b/bin/configs/other/dynamic-html.yaml @@ -0,0 +1,3 @@ +generatorName: dynamic-html +outputDir: samples/documentation/dynamic-html +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml diff --git a/bin/configs/other/eiffel.yaml b/bin/configs/other/eiffel.yaml new file mode 100644 index 0000000000..07a6266224 --- /dev/null +++ b/bin/configs/other/eiffel.yaml @@ -0,0 +1,3 @@ +generatorName: eiffel +outputDir: samples/client/petstore/eiffel +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml diff --git a/bin/configs/other/erlang-client.yaml b/bin/configs/other/erlang-client.yaml new file mode 100644 index 0000000000..27f1bdefe8 --- /dev/null +++ b/bin/configs/other/erlang-client.yaml @@ -0,0 +1,6 @@ +generatorName: erlang-client +outputDir: samples/client/petstore/erlang-client +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/erlang-client +additionalProperties: + packageName: petstore diff --git a/bin/configs/other/erlang-proper.yaml b/bin/configs/other/erlang-proper.yaml new file mode 100644 index 0000000000..efde38060c --- /dev/null +++ b/bin/configs/other/erlang-proper.yaml @@ -0,0 +1,6 @@ +generatorName: erlang-proper +outputDir: samples/client/petstore/erlang-proper +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/erlang-proper +additionalProperties: + packageName: petstore diff --git a/bin/configs/other/erlang-server.yaml b/bin/configs/other/erlang-server.yaml new file mode 100644 index 0000000000..043ec4ffa7 --- /dev/null +++ b/bin/configs/other/erlang-server.yaml @@ -0,0 +1,4 @@ +generatorName: erlang-server +outputDir: samples/server/petstore/erlang-server +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/erlang-server diff --git a/bin/configs/other/flash.yaml b/bin/configs/other/flash.yaml new file mode 100644 index 0000000000..167b8ee89f --- /dev/null +++ b/bin/configs/other/flash.yaml @@ -0,0 +1,7 @@ +generatorName: flash +outputDir: samples/client/petstore/flash +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/flash +additionalProperties: + invokerPackage: org.openapitools + packageName: org.openapitools diff --git a/bin/configs/other/fsharp-functions.yaml b/bin/configs/other/fsharp-functions.yaml new file mode 100644 index 0000000000..d88cc16528 --- /dev/null +++ b/bin/configs/other/fsharp-functions.yaml @@ -0,0 +1,3 @@ +generatorName: fsharp-functions +outputDir: samples/server/petstore/fsharp-functions +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml diff --git a/bin/configs/other/fsharp-giraffe-server-fsharp-giraffe.yaml b/bin/configs/other/fsharp-giraffe-server-fsharp-giraffe.yaml new file mode 100644 index 0000000000..8888260330 --- /dev/null +++ b/bin/configs/other/fsharp-giraffe-server-fsharp-giraffe.yaml @@ -0,0 +1,4 @@ +generatorName: fsharp-giraffe-server +outputDir: samples/server/petstore/fsharp-giraffe +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/fsharp-giraffe-server diff --git a/bin/configs/other/graphql-nodejs-express-server.yaml b/bin/configs/other/graphql-nodejs-express-server.yaml new file mode 100644 index 0000000000..a26f6ad444 --- /dev/null +++ b/bin/configs/other/graphql-nodejs-express-server.yaml @@ -0,0 +1,6 @@ +generatorName: graphql-nodejs-express-server +outputDir: samples/server/petstore/graphql-nodejs-express-server +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/graphql-nodejs-express-server +additionalProperties: + packageName: petstore diff --git a/bin/configs/other/graphql-schema.yaml b/bin/configs/other/graphql-schema.yaml new file mode 100644 index 0000000000..2b019d74f6 --- /dev/null +++ b/bin/configs/other/graphql-schema.yaml @@ -0,0 +1,6 @@ +generatorName: graphql-schema +outputDir: samples/config/petstore/graphql-schema +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/graphql-schema +additionalProperties: + packageName: petstore diff --git a/bin/configs/other/haskell-servant.yaml b/bin/configs/other/haskell-servant.yaml new file mode 100644 index 0000000000..1419e54909 --- /dev/null +++ b/bin/configs/other/haskell-servant.yaml @@ -0,0 +1,4 @@ +generatorName: haskell +outputDir: samples/server/petstore/haskell-servant +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/haskell-servant diff --git a/bin/configs/other/html.md.yaml b/bin/configs/other/html.md.yaml new file mode 100644 index 0000000000..31bb5790c9 --- /dev/null +++ b/bin/configs/other/html.md.yaml @@ -0,0 +1,3 @@ +generatorName: html +outputDir: samples/documentation/html.md +inputSpec: modules/openapi-generator/src/test/resources/2_0/markdown.yaml diff --git a/bin/configs/other/html.yaml b/bin/configs/other/html.yaml new file mode 100644 index 0000000000..ea24dcbd4b --- /dev/null +++ b/bin/configs/other/html.yaml @@ -0,0 +1,4 @@ +generatorName: html +outputDir: samples/documentation/html +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/htmlDocs diff --git a/bin/configs/other/html2.yaml b/bin/configs/other/html2.yaml new file mode 100644 index 0000000000..09022fd5fb --- /dev/null +++ b/bin/configs/other/html2.yaml @@ -0,0 +1,6 @@ +generatorName: html2 +outputDir: samples/documentation/html2 +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/htmlDocs2 +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/bin/configs/other/java-inflector.yaml b/bin/configs/other/java-inflector.yaml new file mode 100644 index 0000000000..d7a88695ac --- /dev/null +++ b/bin/configs/other/java-inflector.yaml @@ -0,0 +1,6 @@ +generatorName: java-inflector +outputDir: samples/server/petstore/java-inflector +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaInflector +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/bin/configs/other/java-native-async.yaml b/bin/configs/other/java-native-async.yaml new file mode 100644 index 0000000000..eb95d524a2 --- /dev/null +++ b/bin/configs/other/java-native-async.yaml @@ -0,0 +1,9 @@ +generatorName: java +outputDir: samples/client/petstore/java/native-async +library: native +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/Java +additionalProperties: + artifactId: petstore-native + hideGenerationTimestamp: "true" + asyncNative: "true" diff --git a/bin/configs/other/java-pkmst.yaml b/bin/configs/other/java-pkmst.yaml new file mode 100644 index 0000000000..4d428c3679 --- /dev/null +++ b/bin/configs/other/java-pkmst.yaml @@ -0,0 +1,6 @@ +generatorName: java-pkmst +outputDir: samples/server/petstore/java-pkmst +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/java-pkmst +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/bin/configs/other/java-undertow-server-java-undertow.yaml b/bin/configs/other/java-undertow-server-java-undertow.yaml new file mode 100644 index 0000000000..2cbb1160f1 --- /dev/null +++ b/bin/configs/other/java-undertow-server-java-undertow.yaml @@ -0,0 +1,6 @@ +generatorName: java-undertow-server +outputDir: samples/server/petstore/java-undertow +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/java-undertow-server +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/bin/configs/other/java-vertx-async.yaml b/bin/configs/other/java-vertx-async.yaml new file mode 100644 index 0000000000..e9eee5e8f6 --- /dev/null +++ b/bin/configs/other/java-vertx-async.yaml @@ -0,0 +1,6 @@ +generatorName: java-vertx +outputDir: samples/server/petstore/java-vertx/async +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + hideGenerationTimestamp: "true" + vertxSwaggerRouterVersion: 1.4.0 diff --git a/bin/configs/other/java-vertx-rx.yaml b/bin/configs/other/java-vertx-rx.yaml new file mode 100644 index 0000000000..af064e6cba --- /dev/null +++ b/bin/configs/other/java-vertx-rx.yaml @@ -0,0 +1,8 @@ +generatorName: java-vertx +outputDir: samples/server/petstore/java-vertx/rx +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + artifactId: java-vertx-rx-server + hideGenerationTimestamp: "true" + vertxSwaggerRouterVersion: 1.4.0 + rxInterface: "true" diff --git a/bin/configs/other/java-vertx-web-rx.yaml b/bin/configs/other/java-vertx-web-rx.yaml new file mode 100644 index 0000000000..609aade555 --- /dev/null +++ b/bin/configs/other/java-vertx-web-rx.yaml @@ -0,0 +1,7 @@ +generatorName: java-vertx-web +outputDir: samples/server/petstore/java-vertx-web/rx +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaVertXWebServer +additionalProperties: + hideGenerationTimestamp: "true" + artifactId: java-vertx-web-rx-server diff --git a/bin/configs/other/javascript-apollo.yaml b/bin/configs/other/javascript-apollo.yaml new file mode 100644 index 0000000000..c462a62220 --- /dev/null +++ b/bin/configs/other/javascript-apollo.yaml @@ -0,0 +1,6 @@ +generatorName: javascript-apollo +outputDir: samples/client/petstore/javascript-apollo +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/Javascript-Apollo +additionalProperties: + appName: PetstoreClient diff --git a/bin/configs/other/javascript-closure-angular.yaml b/bin/configs/other/javascript-closure-angular.yaml new file mode 100644 index 0000000000..391b76b3e0 --- /dev/null +++ b/bin/configs/other/javascript-closure-angular.yaml @@ -0,0 +1,3 @@ +generatorName: javascript-closure-angular +outputDir: samples/client/petstore/javascript-closure-angular +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml diff --git a/bin/configs/other/javascript-flowtyped.yaml b/bin/configs/other/javascript-flowtyped.yaml new file mode 100644 index 0000000000..514f7fe1df --- /dev/null +++ b/bin/configs/other/javascript-flowtyped.yaml @@ -0,0 +1,6 @@ +generatorName: javascript-flowtyped +outputDir: samples/client/petstore/javascript-flowtyped +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/Javascript-Flowtyped +additionalProperties: + appName: PetstoreClient diff --git a/bin/configs/other/jaxrs-cxf-client.yaml b/bin/configs/other/jaxrs-cxf-client.yaml new file mode 100644 index 0000000000..26faac332b --- /dev/null +++ b/bin/configs/other/jaxrs-cxf-client.yaml @@ -0,0 +1,6 @@ +generatorName: jaxrs-cxf-client +outputDir: samples/client/petstore/jaxrs-cxf-client +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/cxf +additionalProperties: + artifactId: jaxrs-cxf-petstore-client diff --git a/bin/configs/other/jaxrs-cxf-extended-jaxrs-cxf-test-data.yaml b/bin/configs/other/jaxrs-cxf-extended-jaxrs-cxf-test-data.yaml new file mode 100644 index 0000000000..c66a09deee --- /dev/null +++ b/bin/configs/other/jaxrs-cxf-extended-jaxrs-cxf-test-data.yaml @@ -0,0 +1,14 @@ +generatorName: jaxrs-cxf-extended +outputDir: samples/server/petstore/jaxrs-cxf-test-data +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext +generateAliasAsModel: true +additionalProperties: + java8: "true" + generateOperationBody: "true" + useAnnotatedBasePath: "true" + generateSpringBootApplication: "true" + artifactId: cxf-test-data + generateSpringApplication: "true" + hideGenerationTimestamp: "true" + loadTestDataFromFile: "true" diff --git a/bin/configs/other/jaxrs-spec-interface-response.yaml b/bin/configs/other/jaxrs-spec-interface-response.yaml new file mode 100644 index 0000000000..c3227e7e82 --- /dev/null +++ b/bin/configs/other/jaxrs-spec-interface-response.yaml @@ -0,0 +1,9 @@ +generatorName: jaxrs-spec +outputDir: samples/server/petstore/jaxrs-spec-interface-response +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + artifactId: jaxrs-spec-interface-response-petstore-server + interfaceOnly: "true" + serializableModel: "true" + hideGenerationTimestamp: "true" + returnResponse: "true" diff --git a/bin/configs/other/jmeter.yaml b/bin/configs/other/jmeter.yaml new file mode 100644 index 0000000000..fb9e359ffb --- /dev/null +++ b/bin/configs/other/jmeter.yaml @@ -0,0 +1,3 @@ +generatorName: jmeter +outputDir: samples/client/petstore/jmeter +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml diff --git a/bin/configs/other/k6.yaml b/bin/configs/other/k6.yaml new file mode 100644 index 0000000000..f1a6c1d5b2 --- /dev/null +++ b/bin/configs/other/k6.yaml @@ -0,0 +1,3 @@ +generatorName: k6 +outputDir: samples/client/petstore/k6 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml diff --git a/bin/configs/other/kotlin-spring-boot-modelMutable.yaml b/bin/configs/other/kotlin-spring-boot-modelMutable.yaml new file mode 100644 index 0000000000..ca3623d059 --- /dev/null +++ b/bin/configs/other/kotlin-spring-boot-modelMutable.yaml @@ -0,0 +1,11 @@ +generatorName: kotlin-spring +outputDir: samples/server/petstore/kotlin-springboot-modelMutable +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-spring +additionalProperties: + library: spring-boot + serializableModel: "true" + swaggerAnnotations: "true" + serviceImplementation: "true" + beanValidations: "true" + modelMutable: "true" diff --git a/bin/configs/other/kotlin-uppercase-enum.yaml b/bin/configs/other/kotlin-uppercase-enum.yaml new file mode 100644 index 0000000000..b3501dd8af --- /dev/null +++ b/bin/configs/other/kotlin-uppercase-enum.yaml @@ -0,0 +1,7 @@ +generatorName: kotlin +outputDir: samples/client/petstore/kotlin-uppercase-enum +inputSpec: modules/openapi-generator/src/test/resources/3_0/issue-4062.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + artifactId: kotlin-uppercase-enum + enumPropertyNaming: UPPERCASE diff --git a/bin/configs/other/kotlin-vertx-vertx.yaml b/bin/configs/other/kotlin-vertx-vertx.yaml new file mode 100644 index 0000000000..83660b6c78 --- /dev/null +++ b/bin/configs/other/kotlin-vertx-vertx.yaml @@ -0,0 +1,5 @@ +generatorName: kotlin-vertx +outputDir: samples/server/petstore/kotlin/vertx +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + modelMutable: "false" diff --git a/bin/configs/other/markdown.yaml b/bin/configs/other/markdown.yaml new file mode 100644 index 0000000000..9b49026716 --- /dev/null +++ b/bin/configs/other/markdown.yaml @@ -0,0 +1,4 @@ +generatorName: markdown +outputDir: samples/documentation/markdown +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/markdown-documentation diff --git a/bin/configs/other/nodejs-express-server.yaml b/bin/configs/other/nodejs-express-server.yaml new file mode 100644 index 0000000000..96c577ffac --- /dev/null +++ b/bin/configs/other/nodejs-express-server.yaml @@ -0,0 +1,4 @@ +generatorName: nodejs-express-server +outputDir: samples/server/petstore/nodejs-express-server +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/nodejs-express-server diff --git a/bin/configs/other/objc-core-data.yaml b/bin/configs/other/objc-core-data.yaml new file mode 100644 index 0000000000..08560dd34d --- /dev/null +++ b/bin/configs/other/objc-core-data.yaml @@ -0,0 +1,8 @@ +generatorName: objc +outputDir: samples/client/petstore/objc/core-data +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.json +templateDir: modules/openapi-generator/src/main/resources/objc +additionalProperties: + classPrefix: SWG + podName: SwaggerClient + coreData: "true" diff --git a/bin/configs/other/objc-default.yaml b/bin/configs/other/objc-default.yaml new file mode 100644 index 0000000000..c2a1e34fd8 --- /dev/null +++ b/bin/configs/other/objc-default.yaml @@ -0,0 +1,7 @@ +generatorName: objc +outputDir: samples/client/petstore/objc/default +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.json +templateDir: modules/openapi-generator/src/main/resources/objc +additionalProperties: + classPrefix: SWG + podName: SwaggerClient diff --git a/bin/configs/other/ocaml.yaml b/bin/configs/other/ocaml.yaml new file mode 100644 index 0000000000..1933d84fb7 --- /dev/null +++ b/bin/configs/other/ocaml.yaml @@ -0,0 +1,6 @@ +generatorName: ocaml +outputDir: samples/client/petstore/ocaml +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/ocaml +additionalProperties: + packageName: petstore_client diff --git a/bin/configs/other/openapi3/android-httpclient.yaml b/bin/configs/other/openapi3/android-httpclient.yaml new file mode 100644 index 0000000000..32e253e0b8 --- /dev/null +++ b/bin/configs/other/openapi3/android-httpclient.yaml @@ -0,0 +1,6 @@ +generatorName: android +outputDir: samples/client/petstore/android/httpclient +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/android +additionalProperties: + library: httpclient diff --git a/bin/configs/other/openapi3/android-volley.yaml b/bin/configs/other/openapi3/android-volley.yaml new file mode 100644 index 0000000000..4903967ef3 --- /dev/null +++ b/bin/configs/other/openapi3/android-volley.yaml @@ -0,0 +1,6 @@ +generatorName: android +outputDir: samples/client/petstore/android/volley +library: volley +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +additionalProperties: + artifactId: petstore-android-volley diff --git a/bin/configs/other/openapi3/avro-schema.yaml b/bin/configs/other/openapi3/avro-schema.yaml new file mode 100644 index 0000000000..bf44846dc0 --- /dev/null +++ b/bin/configs/other/openapi3/avro-schema.yaml @@ -0,0 +1,4 @@ +generatorName: avro-schema +outputDir: samples/openapi3/schema/petstore/avro-schema +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/avro-schema diff --git a/bin/configs/other/openapi3/bash.yaml b/bin/configs/other/openapi3/bash.yaml new file mode 100644 index 0000000000..04de158b3f --- /dev/null +++ b/bin/configs/other/openapi3/bash.yaml @@ -0,0 +1,14 @@ +generatorName: bash +outputDir: samples/client/petstore/bash +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/bash +additionalProperties: + generateZshCompletion: true + hostEnvironmentVariable: PETSTORE_HOST + curlOptions: -sS --tlsv1.2 + apiKeyAuthEnvironmentVariable: PETSTORE_API_KEY + processMarkdown: true + basicAuthEnvironmentVariable: PETSTORE_BASIC_AUTH + scriptName: petstore-cli + generateBashCompletion: true + hideGenerationTimestamp: "true" diff --git a/bin/configs/other/openapi3/clojure.yaml b/bin/configs/other/openapi3/clojure.yaml new file mode 100644 index 0000000000..718503526f --- /dev/null +++ b/bin/configs/other/openapi3/clojure.yaml @@ -0,0 +1,3 @@ +generatorName: clojure +outputDir: samples/client/petstore/clojure +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.json diff --git a/bin/configs/other/openapi3/cpp-pistache-server-cpp-pistache.yaml b/bin/configs/other/openapi3/cpp-pistache-server-cpp-pistache.yaml new file mode 100644 index 0000000000..4faabff095 --- /dev/null +++ b/bin/configs/other/openapi3/cpp-pistache-server-cpp-pistache.yaml @@ -0,0 +1,4 @@ +generatorName: cpp-pistache-server +outputDir: samples/server/petstore/cpp-pistache +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/cpp-pistache-server diff --git a/bin/configs/other/openapi3/cpp-qt5-client-cpp-qt5.yaml b/bin/configs/other/openapi3/cpp-qt5-client-cpp-qt5.yaml new file mode 100644 index 0000000000..904d99a751 --- /dev/null +++ b/bin/configs/other/openapi3/cpp-qt5-client-cpp-qt5.yaml @@ -0,0 +1,4 @@ +generatorName: cpp-qt5-client +outputDir: samples/client/petstore/cpp-qt5 +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/cpp-qt5-client diff --git a/bin/configs/other/openapi3/cpp-qt5-qhttpengine-server.yaml b/bin/configs/other/openapi3/cpp-qt5-qhttpengine-server.yaml new file mode 100644 index 0000000000..285c0d9d5d --- /dev/null +++ b/bin/configs/other/openapi3/cpp-qt5-qhttpengine-server.yaml @@ -0,0 +1,4 @@ +generatorName: cpp-qt5-qhttpengine-server +outputDir: samples/client/petstore/cpp-qt5-qhttpengine-server +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server diff --git a/bin/configs/other/openapi3/cpp-restbed-server-cpp-restbed.yaml b/bin/configs/other/openapi3/cpp-restbed-server-cpp-restbed.yaml new file mode 100644 index 0000000000..8e653b8a64 --- /dev/null +++ b/bin/configs/other/openapi3/cpp-restbed-server-cpp-restbed.yaml @@ -0,0 +1,3 @@ +generatorName: cpp-restbed-server +outputDir: samples/server/petstore/cpp-restbed +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml diff --git a/bin/configs/other/openapi3/cpp-tizen.yaml b/bin/configs/other/openapi3/cpp-tizen.yaml new file mode 100644 index 0000000000..4f8d0e2a8c --- /dev/null +++ b/bin/configs/other/openapi3/cpp-tizen.yaml @@ -0,0 +1,4 @@ +generatorName: cpp-tizen +outputDir: samples/client/petstore/cpp-tizen +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/cpp-tizen-client diff --git a/bin/configs/other/openapi3/csharp-OpenAPIClient.yaml b/bin/configs/other/openapi3/csharp-OpenAPIClient.yaml new file mode 100644 index 0000000000..84c5cc5af4 --- /dev/null +++ b/bin/configs/other/openapi3/csharp-OpenAPIClient.yaml @@ -0,0 +1,5 @@ +generatorName: csharp +outputDir: samples/openapi3/client/petstore/csharp/OpenAPIClient +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' diff --git a/bin/configs/other/openapi3/csharp-OpenAPIClientNetStandard.yaml b/bin/configs/other/openapi3/csharp-OpenAPIClientNetStandard.yaml new file mode 100644 index 0000000000..64635629d2 --- /dev/null +++ b/bin/configs/other/openapi3/csharp-OpenAPIClientNetStandard.yaml @@ -0,0 +1,6 @@ +generatorName: csharp +outputDir: samples/client/petstore/csharp/OpenAPIClientNetStandard +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + targetFramework: netstandard1.3 + packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' diff --git a/bin/configs/other/openapi3/csharp-OpenAPIClientWithPropertyChanged.yaml b/bin/configs/other/openapi3/csharp-OpenAPIClientWithPropertyChanged.yaml new file mode 100644 index 0000000000..22b05d0dbb --- /dev/null +++ b/bin/configs/other/openapi3/csharp-OpenAPIClientWithPropertyChanged.yaml @@ -0,0 +1,7 @@ +generatorName: csharp +outputDir: samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + packageGuid: '{5CD900DE-8266-412F-A758-28E1F9C623D5}' + generatePropertyChanged: "true" + optionalEmitDefaultValues: "true" diff --git a/bin/configs/other/openapi3/csharp-dotnet2-OpenAPIClient.yaml b/bin/configs/other/openapi3/csharp-dotnet2-OpenAPIClient.yaml new file mode 100644 index 0000000000..fa474d2f56 --- /dev/null +++ b/bin/configs/other/openapi3/csharp-dotnet2-OpenAPIClient.yaml @@ -0,0 +1,5 @@ +generatorName: csharp-dotnet2 +outputDir: samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/bin/configs/other/openapi3/elixir.yaml b/bin/configs/other/openapi3/elixir.yaml new file mode 100644 index 0000000000..79dd519cb1 --- /dev/null +++ b/bin/configs/other/openapi3/elixir.yaml @@ -0,0 +1,4 @@ +generatorName: elixir +outputDir: samples/client/petstore/elixir +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/elixir diff --git a/bin/configs/other/openapi3/flash.yaml b/bin/configs/other/openapi3/flash.yaml new file mode 100644 index 0000000000..52ed771332 --- /dev/null +++ b/bin/configs/other/openapi3/flash.yaml @@ -0,0 +1,7 @@ +generatorName: flash +outputDir: samples/client/petstore/flash +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/flash +additionalProperties: + invokerPackage: org.openapitools + packageName: org.openapitools diff --git a/bin/configs/other/openapi3/go-gin-server-go-gin-api-server.yaml b/bin/configs/other/openapi3/go-gin-server-go-gin-api-server.yaml new file mode 100644 index 0000000000..81932e5d67 --- /dev/null +++ b/bin/configs/other/openapi3/go-gin-server-go-gin-api-server.yaml @@ -0,0 +1,7 @@ +generatorName: go-gin-server +outputDir: samples/openapi3/server/petstore/go-gin-api-server +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/go-gin-server +additionalProperties: + hideGenerationTimestamp: "true" + packageName: petstoreserver diff --git a/bin/configs/other/openapi3/go-petstore.yaml b/bin/configs/other/openapi3/go-petstore.yaml new file mode 100644 index 0000000000..aefc71b901 --- /dev/null +++ b/bin/configs/other/openapi3/go-petstore.yaml @@ -0,0 +1,7 @@ +generatorName: go +outputDir: samples/openapi3/client/petstore/go/go-petstore +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/go +additionalProperties: + enumClassPrefix: "true" + packageName: petstore diff --git a/bin/configs/other/openapi3/go-server-go-api-server.yaml b/bin/configs/other/openapi3/go-server-go-api-server.yaml new file mode 100644 index 0000000000..c5c85b26da --- /dev/null +++ b/bin/configs/other/openapi3/go-server-go-api-server.yaml @@ -0,0 +1,7 @@ +generatorName: go-server +outputDir: samples/openapi3/server/petstore/go-api-server +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/go-server +additionalProperties: + hideGenerationTimestamp: "true" + packageName: petstoreserver diff --git a/bin/configs/other/openapi3/graphql-nodejs-express-server.yaml b/bin/configs/other/openapi3/graphql-nodejs-express-server.yaml new file mode 100644 index 0000000000..52f9f68d23 --- /dev/null +++ b/bin/configs/other/openapi3/graphql-nodejs-express-server.yaml @@ -0,0 +1,6 @@ +generatorName: graphql-nodejs-express-server +outputDir: samples/server/petstore/graphql-nodejs-express-server +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/graphql-nodejs-express-server +additionalProperties: + packageName: petstore diff --git a/bin/configs/other/openapi3/haskell-http-client.yaml b/bin/configs/other/openapi3/haskell-http-client.yaml new file mode 100644 index 0000000000..7e16cbc573 --- /dev/null +++ b/bin/configs/other/openapi3/haskell-http-client.yaml @@ -0,0 +1,4 @@ +generatorName: haskell-http-client +outputDir: samples/client/petstore/haskell-http-client +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/haskell-http-client diff --git a/bin/configs/other/openapi3/haskell-servant.yaml b/bin/configs/other/openapi3/haskell-servant.yaml new file mode 100644 index 0000000000..579db01c7f --- /dev/null +++ b/bin/configs/other/openapi3/haskell-servant.yaml @@ -0,0 +1,4 @@ +generatorName: haskell +outputDir: samples/server/petstore/haskell-servant +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/haskell-servant diff --git a/bin/configs/other/openapi3/javascript-closure-angular.yaml b/bin/configs/other/openapi3/javascript-closure-angular.yaml new file mode 100644 index 0000000000..5654e7ba5c --- /dev/null +++ b/bin/configs/other/openapi3/javascript-closure-angular.yaml @@ -0,0 +1,3 @@ +generatorName: javascript-closure-angular +outputDir: samples/client/petstore/javascript-closure-angular +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml diff --git a/bin/configs/other/openapi3/jaxrs-cxf-client.yaml b/bin/configs/other/openapi3/jaxrs-cxf-client.yaml new file mode 100644 index 0000000000..08cb8cd0a6 --- /dev/null +++ b/bin/configs/other/openapi3/jaxrs-cxf-client.yaml @@ -0,0 +1,6 @@ +generatorName: jaxrs-cxf-client +outputDir: samples/client/petstore/jaxrs-cxf-client +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaJaxRS/cxf +additionalProperties: + artifactId: jaxrs-cxf-petstore-client diff --git a/bin/configs/other/openapi3/kotlin-jvm-retrofit2-coroutines.yaml b/bin/configs/other/openapi3/kotlin-jvm-retrofit2-coroutines.yaml new file mode 100644 index 0000000000..b401e27372 --- /dev/null +++ b/bin/configs/other/openapi3/kotlin-jvm-retrofit2-coroutines.yaml @@ -0,0 +1,11 @@ +generatorName: kotlin +outputDir: samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines +library: jvm-retrofit2 +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + serializationLibrary: gson + useCoroutines: "true" + artifactId: kotlin-petstore-coroutines-client + serializableModel: "true" + dateLibrary: java8 diff --git a/bin/configs/other/openapi3/kotlin-jvm-retrofit2-rx.yaml b/bin/configs/other/openapi3/kotlin-jvm-retrofit2-rx.yaml new file mode 100644 index 0000000000..882aa38c7c --- /dev/null +++ b/bin/configs/other/openapi3/kotlin-jvm-retrofit2-rx.yaml @@ -0,0 +1,11 @@ +generatorName: kotlin +outputDir: samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx +library: jvm-retrofit2 +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + serializationLibrary: gson + useRxJava: "true" + artifactId: kotlin-petstore-rx-client + serializableModel: "true" + dateLibrary: java8 diff --git a/bin/configs/other/openapi3/kotlin-jvm-retrofit2-rx2.yaml b/bin/configs/other/openapi3/kotlin-jvm-retrofit2-rx2.yaml new file mode 100644 index 0000000000..2332ff3be1 --- /dev/null +++ b/bin/configs/other/openapi3/kotlin-jvm-retrofit2-rx2.yaml @@ -0,0 +1,11 @@ +generatorName: kotlin +outputDir: samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2 +library: jvm-retrofit2 +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + serializationLibrary: gson + useRxJava2: "true" + artifactId: kotlin-petstore-rx2-client + serializableModel: "true" + dateLibrary: java8 diff --git a/bin/configs/other/openapi3/kotlin-multiplatform.yaml b/bin/configs/other/openapi3/kotlin-multiplatform.yaml new file mode 100644 index 0000000000..befdb3e3dd --- /dev/null +++ b/bin/configs/other/openapi3/kotlin-multiplatform.yaml @@ -0,0 +1,7 @@ +generatorName: kotlin +outputDir: samples/openapi3/client/petstore/kotlin-multiplatform +library: multiplatform +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + artifactId: kotlin-client-petstore-multiplatform diff --git a/bin/configs/other/openapi3/kotlin-spring-boot-reactive.yaml b/bin/configs/other/openapi3/kotlin-spring-boot-reactive.yaml new file mode 100644 index 0000000000..d0a726c998 --- /dev/null +++ b/bin/configs/other/openapi3/kotlin-spring-boot-reactive.yaml @@ -0,0 +1,10 @@ +generatorName: kotlin-spring +outputDir: samples/openapi3/server/petstore/kotlin-springboot-reactive +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-spring +additionalProperties: + serviceImplementation: "true" + library: spring-boot + reactive: "true" + swaggerAnnotations: "true" + beanValidations: "true" diff --git a/bin/configs/other/openapi3/kotlin-spring-boot.yaml b/bin/configs/other/openapi3/kotlin-spring-boot.yaml new file mode 100644 index 0000000000..a61d999a53 --- /dev/null +++ b/bin/configs/other/openapi3/kotlin-spring-boot.yaml @@ -0,0 +1,10 @@ +generatorName: kotlin-spring +outputDir: samples/openapi3/server/petstore/kotlin-springboot +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-spring +additionalProperties: + serviceImplementation: "true" + library: spring-boot + serializableModel: "true" + swaggerAnnotations: "true" + beanValidations: "true" diff --git a/bin/configs/other/openapi3/kotlin.yaml b/bin/configs/other/openapi3/kotlin.yaml new file mode 100644 index 0000000000..526a8ef865 --- /dev/null +++ b/bin/configs/other/openapi3/kotlin.yaml @@ -0,0 +1,8 @@ +generatorName: kotlin +outputDir: samples/openapi3/client/petstore/kotlin +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/kotlin-client +additionalProperties: + artifactId: kotlin-petstore-client + serializableModel: "true" + dateLibrary: java8 diff --git a/bin/configs/other/openapi3/objc-core-data.yaml b/bin/configs/other/openapi3/objc-core-data.yaml new file mode 100644 index 0000000000..7d3e047bc2 --- /dev/null +++ b/bin/configs/other/openapi3/objc-core-data.yaml @@ -0,0 +1,7 @@ +generatorName: objc +outputDir: samples/client/petstore/objc/core-data +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.json +templateDir: modules/openapi-generator/src/main/resources/objc +additionalProperties: + coreData: "true" + appName: PetstoreClient diff --git a/bin/configs/other/openapi3/objc-default.yaml b/bin/configs/other/openapi3/objc-default.yaml new file mode 100644 index 0000000000..fbdef1a0a2 --- /dev/null +++ b/bin/configs/other/openapi3/objc-default.yaml @@ -0,0 +1,6 @@ +generatorName: objc +outputDir: samples/client/petstore/objc/default +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.json +templateDir: modules/openapi-generator/src/main/resources/objc +additionalProperties: + appName: PetstoreClient diff --git a/bin/configs/other/openapi3/php-laravel.yaml b/bin/configs/other/openapi3/php-laravel.yaml new file mode 100644 index 0000000000..3a405cc673 --- /dev/null +++ b/bin/configs/other/openapi3/php-laravel.yaml @@ -0,0 +1,4 @@ +generatorName: php-laravel +outputDir: samples/server/petstore/php-laravel +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/php-laravel diff --git a/bin/configs/other/openapi3/php-slim-deprecated-php-slim.yaml b/bin/configs/other/openapi3/php-slim-deprecated-php-slim.yaml new file mode 100644 index 0000000000..09147cbb67 --- /dev/null +++ b/bin/configs/other/openapi3/php-slim-deprecated-php-slim.yaml @@ -0,0 +1,4 @@ +generatorName: php-slim-deprecated +outputDir: samples/server/petstore/php-slim +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/php-slim-server diff --git a/bin/configs/other/openapi3/php-slim4.yaml b/bin/configs/other/openapi3/php-slim4.yaml new file mode 100644 index 0000000000..a15c313a77 --- /dev/null +++ b/bin/configs/other/openapi3/php-slim4.yaml @@ -0,0 +1,4 @@ +generatorName: php-slim4 +outputDir: samples/server/petstore/php-slim4 +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/php-slim4-server diff --git a/bin/configs/other/openapi3/php-symfony-SymfonyBundle-php.yaml b/bin/configs/other/openapi3/php-symfony-SymfonyBundle-php.yaml new file mode 100644 index 0000000000..ffb7015b65 --- /dev/null +++ b/bin/configs/other/openapi3/php-symfony-SymfonyBundle-php.yaml @@ -0,0 +1,4 @@ +generatorName: php-symfony +outputDir: samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/php-symfony diff --git a/bin/configs/other/openapi3/python-flask-python2.yaml b/bin/configs/other/openapi3/python-flask-python2.yaml new file mode 100644 index 0000000000..407389d912 --- /dev/null +++ b/bin/configs/other/openapi3/python-flask-python2.yaml @@ -0,0 +1,6 @@ +generatorName: python-flask +outputDir: samples/openapi3/server/petstore/python-flask-python2 +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-object-as-parameter.yaml +templateDir: modules/openapi-generator/src/main/resources/python-flask +additionalProperties: + supportPython2: true diff --git a/bin/configs/other/openapi3/python-flask.yaml b/bin/configs/other/openapi3/python-flask.yaml new file mode 100644 index 0000000000..aaca56bc6e --- /dev/null +++ b/bin/configs/other/openapi3/python-flask.yaml @@ -0,0 +1,4 @@ +generatorName: python-flask +outputDir: samples/openapi3/server/petstore/python-flask +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-object-as-parameter.yaml +templateDir: modules/openapi-generator/src/main/resources/python-flask diff --git a/bin/configs/other/openapi3/r-R.yaml b/bin/configs/other/openapi3/r-R.yaml new file mode 100644 index 0000000000..61be8bc8f1 --- /dev/null +++ b/bin/configs/other/openapi3/r-R.yaml @@ -0,0 +1,6 @@ +generatorName: r +outputDir: samples/client/petstore/R +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/r +additionalProperties: + packageName: petstore diff --git a/bin/configs/other/openapi3/rust.yaml b/bin/configs/other/openapi3/rust.yaml new file mode 100644 index 0000000000..bb98782008 --- /dev/null +++ b/bin/configs/other/openapi3/rust.yaml @@ -0,0 +1,6 @@ +generatorName: rust +outputDir: samples/client/petstore/rust +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/rust +additionalProperties: + packageName: petstore_client diff --git a/bin/configs/other/openapi3/scala-finch.yaml b/bin/configs/other/openapi3/scala-finch.yaml new file mode 100644 index 0000000000..3a9e69e674 --- /dev/null +++ b/bin/configs/other/openapi3/scala-finch.yaml @@ -0,0 +1,4 @@ +generatorName: scala-finch +outputDir: samples/server/petstore/scala-finch +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/scala-finch diff --git a/bin/configs/other/openapi3/typescript-angular-default.yaml b/bin/configs/other/openapi3/typescript-angular-default.yaml new file mode 100644 index 0000000000..b9c8bb045b --- /dev/null +++ b/bin/configs/other/openapi3/typescript-angular-default.yaml @@ -0,0 +1,5 @@ +generatorName: typescript-angular +outputDir: samples/client/petstore/typescript-angular-v2/default +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +additionalProperties: + ngVersion: "2" diff --git a/bin/configs/other/openapi3/typescript-angular-npm.yaml b/bin/configs/other/openapi3/typescript-angular-npm.yaml new file mode 100644 index 0000000000..537555aab7 --- /dev/null +++ b/bin/configs/other/openapi3/typescript-angular-npm.yaml @@ -0,0 +1,9 @@ +generatorName: typescript-angular +outputDir: samples/client/petstore/typescript-angular-v4.3/npm +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +additionalProperties: + npmVersion: 0.0.1 + ngVersion: "4.3" + npmName: '@openapitools/angular2-typescript-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/bin/configs/other/openapi3/typescript-angular-with-interfaces.yaml b/bin/configs/other/openapi3/typescript-angular-with-interfaces.yaml new file mode 100644 index 0000000000..a0f7e7de65 --- /dev/null +++ b/bin/configs/other/openapi3/typescript-angular-with-interfaces.yaml @@ -0,0 +1,6 @@ +generatorName: typescript-angular +outputDir: samples/client/petstore/typescript-angular-v2/with-interfaces +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +additionalProperties: + withInterfaces: "true" + ngVersion: "2" diff --git a/bin/configs/other/openapi3/typescript-angularjs.yaml b/bin/configs/other/openapi3/typescript-angularjs.yaml new file mode 100644 index 0000000000..c379fa2ac6 --- /dev/null +++ b/bin/configs/other/openapi3/typescript-angularjs.yaml @@ -0,0 +1,3 @@ +generatorName: typescript-angularjs +outputDir: samples/client/petstore/typescript-angularjs +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml diff --git a/bin/configs/other/openapi3/typescript-aurelia-default.yaml b/bin/configs/other/openapi3/typescript-aurelia-default.yaml new file mode 100644 index 0000000000..9a8fd34ad1 --- /dev/null +++ b/bin/configs/other/openapi3/typescript-aurelia-default.yaml @@ -0,0 +1,3 @@ +generatorName: typescript-aurelia +outputDir: samples/client/petstore/typescript-aurelia/default +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml diff --git a/bin/configs/other/openapi3/typescript-fetch-default.yaml b/bin/configs/other/openapi3/typescript-fetch-default.yaml new file mode 100644 index 0000000000..d7d60dee38 --- /dev/null +++ b/bin/configs/other/openapi3/typescript-fetch-default.yaml @@ -0,0 +1,3 @@ +generatorName: typescript-fetch +outputDir: samples/client/petstore/typescript-fetch/builds/default +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml diff --git a/bin/configs/other/openapi3/typescript-fetch-es6-target.yaml b/bin/configs/other/openapi3/typescript-fetch-es6-target.yaml new file mode 100644 index 0000000000..b62b1c17ff --- /dev/null +++ b/bin/configs/other/openapi3/typescript-fetch-es6-target.yaml @@ -0,0 +1,9 @@ +generatorName: typescript-fetch +outputDir: samples/client/petstore/typescript-fetch/builds/es6-target +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +additionalProperties: + npmVersion: 1.0.0 + supportsES6: true + npmName: '@openapitools/typescript-fetch-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/bin/configs/other/openapi3/typescript-fetch-with-interfaces.yaml b/bin/configs/other/openapi3/typescript-fetch-with-interfaces.yaml new file mode 100644 index 0000000000..9db3697aba --- /dev/null +++ b/bin/configs/other/openapi3/typescript-fetch-with-interfaces.yaml @@ -0,0 +1,5 @@ +generatorName: typescript-fetch +outputDir: samples/client/petstore/typescript-fetch/builds/with-interfaces +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +additionalProperties: + withInterfaces: "true" diff --git a/bin/configs/other/openapi3/typescript-fetch-with-npm-version.yaml b/bin/configs/other/openapi3/typescript-fetch-with-npm-version.yaml new file mode 100644 index 0000000000..337538857d --- /dev/null +++ b/bin/configs/other/openapi3/typescript-fetch-with-npm-version.yaml @@ -0,0 +1,8 @@ +generatorName: typescript-fetch +outputDir: samples/client/petstore/typescript-fetch/builds/with-npm-version +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +additionalProperties: + npmVersion: 1.0.0 + npmName: '@openapitools/typescript-fetch-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/bin/configs/other/openapi3/typescript-inversify.yaml b/bin/configs/other/openapi3/typescript-inversify.yaml new file mode 100644 index 0000000000..a7b55a5045 --- /dev/null +++ b/bin/configs/other/openapi3/typescript-inversify.yaml @@ -0,0 +1,3 @@ +generatorName: typescript-inversify +outputDir: samples/client/petstore/typescript-inversify +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml diff --git a/bin/configs/other/openapi3/typescript-jquery-default.yaml b/bin/configs/other/openapi3/typescript-jquery-default.yaml new file mode 100644 index 0000000000..54c50bae2a --- /dev/null +++ b/bin/configs/other/openapi3/typescript-jquery-default.yaml @@ -0,0 +1,3 @@ +generatorName: typescript-jquery +outputDir: samples/client/petstore/typescript-jquery/default +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml diff --git a/bin/configs/other/openapi3/typescript-jquery-npm.yaml b/bin/configs/other/openapi3/typescript-jquery-npm.yaml new file mode 100644 index 0000000000..fe44d227ec --- /dev/null +++ b/bin/configs/other/openapi3/typescript-jquery-npm.yaml @@ -0,0 +1,8 @@ +generatorName: typescript-jquery +outputDir: samples/client/petstore/typescript-jquery/npm +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +additionalProperties: + npmVersion: 0.0.1 + npmName: '@openapitools/jquery-typescript-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/bin/configs/other/openapi3/typescript-node-default.yaml b/bin/configs/other/openapi3/typescript-node-default.yaml new file mode 100644 index 0000000000..5b43b294fa --- /dev/null +++ b/bin/configs/other/openapi3/typescript-node-default.yaml @@ -0,0 +1,3 @@ +generatorName: typescript-node +outputDir: samples/client/petstore/typescript-node/default +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml diff --git a/bin/configs/other/openapi3/typescript-node-npm.yaml b/bin/configs/other/openapi3/typescript-node-npm.yaml new file mode 100644 index 0000000000..15fdb55361 --- /dev/null +++ b/bin/configs/other/openapi3/typescript-node-npm.yaml @@ -0,0 +1,8 @@ +generatorName: typescript-node +outputDir: samples/client/petstore/typescript-node/npm +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +additionalProperties: + npmVersion: 0.0.1 + npmName: '@openapitools/angular2-typescript-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/bin/configs/other/php-laravel.yaml b/bin/configs/other/php-laravel.yaml new file mode 100644 index 0000000000..1bc76c95f4 --- /dev/null +++ b/bin/configs/other/php-laravel.yaml @@ -0,0 +1,4 @@ +generatorName: php-laravel +outputDir: samples/server/petstore/php-laravel +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/php-laravel diff --git a/bin/configs/other/php-slim4.yaml b/bin/configs/other/php-slim4.yaml new file mode 100644 index 0000000000..86e4124ad8 --- /dev/null +++ b/bin/configs/other/php-slim4.yaml @@ -0,0 +1,4 @@ +generatorName: php-slim4 +outputDir: samples/server/petstore/php-slim4 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/php-slim4-server diff --git a/bin/configs/other/plantuml.yaml b/bin/configs/other/plantuml.yaml new file mode 100644 index 0000000000..397fad4f64 --- /dev/null +++ b/bin/configs/other/plantuml.yaml @@ -0,0 +1,4 @@ +generatorName: plantuml +outputDir: samples/documentation/petstore/plantuml +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/plantuml diff --git a/bin/configs/other/powershell.yaml b/bin/configs/other/powershell.yaml new file mode 100644 index 0000000000..2ef633c994 --- /dev/null +++ b/bin/configs/other/powershell.yaml @@ -0,0 +1,11 @@ +generatorName: powershell +outputDir: samples/client/petstore/powershell +inputSpec: modules/openapi-generator/src/test/resources/3_0/powershell/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/powershell +additionalProperties: + packageGuid: a27b908d-2a20-467f-bc32-af6f3a654ac5 + commonVerbs: Delete=Remove:Patch=Update + packageVersion: 0.1.2 + packageName: PSPetstore + powershellGalleryUrl: https://www.powershellgallery.com/packages/PSPetstore + apiNamePrefix: PS diff --git a/bin/configs/other/protobuf-schema.yaml b/bin/configs/other/protobuf-schema.yaml new file mode 100644 index 0000000000..2b368f5d50 --- /dev/null +++ b/bin/configs/other/protobuf-schema.yaml @@ -0,0 +1,6 @@ +generatorName: protobuf-schema +outputDir: samples/config/petstore/protobuf-schema +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/protobuf-schema +additionalProperties: + packageName: petstore diff --git a/bin/configs/other/ruby-on-rails.yaml b/bin/configs/other/ruby-on-rails.yaml new file mode 100644 index 0000000000..931c44baa0 --- /dev/null +++ b/bin/configs/other/ruby-on-rails.yaml @@ -0,0 +1,4 @@ +generatorName: ruby-on-rails +outputDir: samples/server/petstore/ruby-on-rails +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/ruby-on-rails-server diff --git a/bin/configs/other/ruby-sinatra.yaml b/bin/configs/other/ruby-sinatra.yaml new file mode 100644 index 0000000000..f612a023c3 --- /dev/null +++ b/bin/configs/other/ruby-sinatra.yaml @@ -0,0 +1,4 @@ +generatorName: ruby-sinatra +outputDir: samples/server/petstore/ruby-sinatra +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/ruby-sinatra-server diff --git a/bin/configs/other/rust-hyper-fileResponseTest.yaml b/bin/configs/other/rust-hyper-fileResponseTest.yaml new file mode 100644 index 0000000000..fc26c786be --- /dev/null +++ b/bin/configs/other/rust-hyper-fileResponseTest.yaml @@ -0,0 +1,9 @@ +generatorName: rust +outputDir: samples/client/petstore/rust/hyper/fileResponseTest +library: hyper +inputSpec: modules/openapi-generator/src/test/resources/2_0/fileResponseTest.json +templateDir: modules/openapi-generator/src/main/resources/rust +generateAliasAsModel: true +additionalProperties: + supportAsync: "false" + packageName: fileResponseTest-hyper diff --git a/bin/configs/other/rust-hyper-petstore.yaml b/bin/configs/other/rust-hyper-petstore.yaml new file mode 100644 index 0000000000..979b2f1fba --- /dev/null +++ b/bin/configs/other/rust-hyper-petstore.yaml @@ -0,0 +1,8 @@ +generatorName: rust +outputDir: samples/client/petstore/rust/hyper/petstore +library: hyper +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/rust +additionalProperties: + supportAsync: "false" + packageName: petstore-hyper diff --git a/bin/configs/other/rust-hyper-test.yaml b/bin/configs/other/rust-hyper-test.yaml new file mode 100644 index 0000000000..371d69150d --- /dev/null +++ b/bin/configs/other/rust-hyper-test.yaml @@ -0,0 +1,8 @@ +generatorName: rust +outputDir: samples/client/petstore/rust/hyper/rust-test +library: hyper +inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/rust-test.yaml +templateDir: modules/openapi-generator/src/main/resources/rust +additionalProperties: + supportAsync: "false" + packageName: rust-test-hyper diff --git a/bin/configs/other/rust-reqwest-fileResponseTest.yaml b/bin/configs/other/rust-reqwest-fileResponseTest.yaml new file mode 100644 index 0000000000..15aadb7217 --- /dev/null +++ b/bin/configs/other/rust-reqwest-fileResponseTest.yaml @@ -0,0 +1,8 @@ +generatorName: rust +outputDir: samples/client/petstore/rust/reqwest/fileResponseTest +library: reqwest +inputSpec: modules/openapi-generator/src/test/resources/2_0/fileResponseTest.json +templateDir: modules/openapi-generator/src/main/resources/rust +additionalProperties: + supportAsync: "false" + packageName: fileResponseTest-reqwest diff --git a/bin/configs/other/rust-reqwest-petstore-async.yaml b/bin/configs/other/rust-reqwest-petstore-async.yaml new file mode 100644 index 0000000000..0fb53b47d2 --- /dev/null +++ b/bin/configs/other/rust-reqwest-petstore-async.yaml @@ -0,0 +1,8 @@ +generatorName: rust +outputDir: samples/client/petstore/rust/reqwest/petstore-async +library: reqwest +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/rust +additionalProperties: + supportAsync: "true" + packageName: petstore-reqwest-async diff --git a/bin/configs/other/rust-reqwest-petstore.yaml b/bin/configs/other/rust-reqwest-petstore.yaml new file mode 100644 index 0000000000..1bc1d4c866 --- /dev/null +++ b/bin/configs/other/rust-reqwest-petstore.yaml @@ -0,0 +1,8 @@ +generatorName: rust +outputDir: samples/client/petstore/rust/reqwest/petstore +library: reqwest +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/rust +additionalProperties: + supportAsync: "false" + packageName: petstore-reqwest diff --git a/bin/configs/other/rust-reqwest-test.yaml b/bin/configs/other/rust-reqwest-test.yaml new file mode 100644 index 0000000000..74dbb40a81 --- /dev/null +++ b/bin/configs/other/rust-reqwest-test.yaml @@ -0,0 +1,8 @@ +generatorName: rust +outputDir: samples/client/petstore/rust/reqwest/rust-test +library: reqwest +inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/rust-test.yaml +templateDir: modules/openapi-generator/src/main/resources/rust +additionalProperties: + supportAsync: "false" + packageName: rust-test-reqwest diff --git a/bin/configs/other/scala-akka-http-server.yaml b/bin/configs/other/scala-akka-http-server.yaml new file mode 100644 index 0000000000..f4c82c9b34 --- /dev/null +++ b/bin/configs/other/scala-akka-http-server.yaml @@ -0,0 +1,3 @@ +generatorName: scala-akka-http-server +outputDir: samples/server/petstore/scala-akka-http-server +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml diff --git a/bin/configs/other/scala-finch.yaml b/bin/configs/other/scala-finch.yaml new file mode 100644 index 0000000000..4ec9a16b9f --- /dev/null +++ b/bin/configs/other/scala-finch.yaml @@ -0,0 +1,6 @@ +systemProperties: + skipFormModel: "true" +generatorName: scala-finch +outputDir: samples/server/petstore/scala-finch +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/scala-finch diff --git a/bin/configs/other/scala-gatling.yaml b/bin/configs/other/scala-gatling.yaml new file mode 100644 index 0000000000..19858a71e1 --- /dev/null +++ b/bin/configs/other/scala-gatling.yaml @@ -0,0 +1,4 @@ +generatorName: scala-gatling +outputDir: samples/client/petstore/scala-gatling +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/scala-gatling diff --git a/bin/configs/other/scala-httpclient-deprecated-scala-httpclient.yaml b/bin/configs/other/scala-httpclient-deprecated-scala-httpclient.yaml new file mode 100644 index 0000000000..45bfe59e5e --- /dev/null +++ b/bin/configs/other/scala-httpclient-deprecated-scala-httpclient.yaml @@ -0,0 +1,4 @@ +generatorName: scala-httpclient-deprecated +outputDir: samples/client/petstore/scala-httpclient +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/scala-httpclient diff --git a/bin/configs/other/scala-lagom-server.yaml b/bin/configs/other/scala-lagom-server.yaml new file mode 100644 index 0000000000..8aabf4b0fd --- /dev/null +++ b/bin/configs/other/scala-lagom-server.yaml @@ -0,0 +1,6 @@ +systemProperties: + skipFormModel: "true" +generatorName: scala-lagom-server +outputDir: samples/server/petstore/scala-lagom-server +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/scala-lagom-server diff --git a/bin/configs/other/scala-play-server.yaml b/bin/configs/other/scala-play-server.yaml new file mode 100644 index 0000000000..8d8d7ba70f --- /dev/null +++ b/bin/configs/other/scala-play-server.yaml @@ -0,0 +1,6 @@ +generatorName: scala-play-server +outputDir: samples/server/petstore/scala-play-server +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/scala-play-server +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/bin/configs/other/scalatra.yaml b/bin/configs/other/scalatra.yaml new file mode 100644 index 0000000000..6445e10cd8 --- /dev/null +++ b/bin/configs/other/scalatra.yaml @@ -0,0 +1,4 @@ +generatorName: scalatra +outputDir: samples/server/petstore/scalatra +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/scalatra diff --git a/bin/configs/other/scalaz.yaml b/bin/configs/other/scalaz.yaml new file mode 100644 index 0000000000..3cb4834d03 --- /dev/null +++ b/bin/configs/other/scalaz.yaml @@ -0,0 +1,6 @@ +systemProperties: + skipFormModel: "true" +generatorName: scalaz +outputDir: samples/client/petstore/scalaz +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/scalaz diff --git a/bin/configs/other/swift5-alamofireLibrary.yaml b/bin/configs/other/swift5-alamofireLibrary.yaml new file mode 100644 index 0000000000..4c248326d5 --- /dev/null +++ b/bin/configs/other/swift5-alamofireLibrary.yaml @@ -0,0 +1,11 @@ +generatorName: swift5 +outputDir: samples/client/petstore/swift5/alamofireLibrary +library: alamofire +inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/swift5 +generateAliasAsModel: true +additionalProperties: + podAuthors: "" + podSummary: PetstoreClient + projectName: PetstoreClient + podHomepage: https://github.com/openapitools/openapi-generator diff --git a/bin/configs/other/swift5-combineLibrary.yaml b/bin/configs/other/swift5-combineLibrary.yaml new file mode 100644 index 0000000000..9456638acf --- /dev/null +++ b/bin/configs/other/swift5-combineLibrary.yaml @@ -0,0 +1,11 @@ +generatorName: swift5 +outputDir: samples/client/petstore/swift5/combineLibrary +inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/swift5 +generateAliasAsModel: true +additionalProperties: + responseAs: Combine + podAuthors: "" + podSummary: PetstoreClient + projectName: PetstoreClient + podHomepage: https://github.com/openapitools/openapi-generator diff --git a/bin/configs/other/swift5-default.yaml b/bin/configs/other/swift5-default.yaml new file mode 100644 index 0000000000..ede36e7331 --- /dev/null +++ b/bin/configs/other/swift5-default.yaml @@ -0,0 +1,10 @@ +generatorName: swift5 +outputDir: samples/client/petstore/swift5/default +inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/swift5 +generateAliasAsModel: true +additionalProperties: + podAuthors: "" + podSummary: PetstoreClient + projectName: PetstoreClient + podHomepage: https://github.com/openapitools/openapi-generator diff --git a/bin/configs/other/swift5-deprecated.yaml b/bin/configs/other/swift5-deprecated.yaml new file mode 100644 index 0000000000..0b02067313 --- /dev/null +++ b/bin/configs/other/swift5-deprecated.yaml @@ -0,0 +1,10 @@ +generatorName: swift5 +outputDir: samples/client/petstore/swift5/deprecated +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-depreacted-fields.yaml +templateDir: modules/openapi-generator/src/main/resources/swift5 +generateAliasAsModel: true +additionalProperties: + podAuthors: "" + podSummary: PetstoreClient + projectName: PetstoreClient + podHomepage: https://github.com/openapitools/openapi-generator diff --git a/bin/configs/other/swift5-nonPublicApi.yaml b/bin/configs/other/swift5-nonPublicApi.yaml new file mode 100644 index 0000000000..1aec2c3bb1 --- /dev/null +++ b/bin/configs/other/swift5-nonPublicApi.yaml @@ -0,0 +1,12 @@ +generatorName: swift5 +outputDir: samples/client/petstore/swift5/nonPublicApi +inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/swift5 +generateAliasAsModel: true +additionalProperties: + podAuthors: "" + podSummary: PetstoreClient + sortParamsByRequiredFlag: false + nonPublicApi: true + projectName: PetstoreClient + podHomepage: https://github.com/openapitools/openapi-generator diff --git a/bin/configs/other/swift5-objcCompatible.yaml b/bin/configs/other/swift5-objcCompatible.yaml new file mode 100644 index 0000000000..deb33907cc --- /dev/null +++ b/bin/configs/other/swift5-objcCompatible.yaml @@ -0,0 +1,11 @@ +generatorName: swift5 +outputDir: samples/client/petstore/swift5/objcCompatible +inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/swift5 +generateAliasAsModel: true +additionalProperties: + podAuthors: "" + podSummary: PetstoreClient + objcCompatible: true + projectName: PetstoreClient + podHomepage: https://github.com/openapitools/openapi-generator diff --git a/bin/configs/other/swift5-promisekitLibrary.yaml b/bin/configs/other/swift5-promisekitLibrary.yaml new file mode 100644 index 0000000000..5cdeb02ad2 --- /dev/null +++ b/bin/configs/other/swift5-promisekitLibrary.yaml @@ -0,0 +1,11 @@ +generatorName: swift5 +outputDir: samples/client/petstore/swift5/promisekitLibrary +inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/swift5 +generateAliasAsModel: true +additionalProperties: + responseAs: PromiseKit + podAuthors: "" + podSummary: PetstoreClient + projectName: PetstoreClient + podHomepage: https://github.com/openapitools/openapi-generator diff --git a/bin/configs/other/swift5-readonlyProperties.yaml b/bin/configs/other/swift5-readonlyProperties.yaml new file mode 100644 index 0000000000..0bb8b9d6f5 --- /dev/null +++ b/bin/configs/other/swift5-readonlyProperties.yaml @@ -0,0 +1,11 @@ +generatorName: swift5 +outputDir: samples/client/petstore/swift5/readonlyProperties +inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/swift5 +generateAliasAsModel: true +additionalProperties: + podAuthors: "" + podSummary: PetstoreClient + readonlyProperties: true + projectName: PetstoreClient + podHomepage: https://github.com/openapitools/openapi-generator diff --git a/bin/configs/other/swift5-resultLibrary.yaml b/bin/configs/other/swift5-resultLibrary.yaml new file mode 100644 index 0000000000..0f0e4373e2 --- /dev/null +++ b/bin/configs/other/swift5-resultLibrary.yaml @@ -0,0 +1,11 @@ +generatorName: swift5 +outputDir: samples/client/petstore/swift5/resultLibrary +inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/swift5 +generateAliasAsModel: true +additionalProperties: + responseAs: Result + podAuthors: "" + podSummary: PetstoreClient + projectName: PetstoreClient + podHomepage: https://github.com/openapitools/openapi-generator diff --git a/bin/configs/other/swift5-rxswiftLibrary.yaml b/bin/configs/other/swift5-rxswiftLibrary.yaml new file mode 100644 index 0000000000..f564ac3340 --- /dev/null +++ b/bin/configs/other/swift5-rxswiftLibrary.yaml @@ -0,0 +1,11 @@ +generatorName: swift5 +outputDir: samples/client/petstore/swift5/rxswiftLibrary +inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/swift5 +generateAliasAsModel: true +additionalProperties: + responseAs: RxSwift + podAuthors: "" + podSummary: PetstoreClient + projectName: PetstoreClient + podHomepage: https://github.com/openapitools/openapi-generator diff --git a/bin/configs/other/swift5-urlsessionLibrary.yaml b/bin/configs/other/swift5-urlsessionLibrary.yaml new file mode 100644 index 0000000000..2fe5ecca0c --- /dev/null +++ b/bin/configs/other/swift5-urlsessionLibrary.yaml @@ -0,0 +1,11 @@ +generatorName: swift5 +outputDir: samples/client/petstore/swift5/urlsessionLibrary +library: urlsession +inputSpec: modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/swift5 +generateAliasAsModel: true +additionalProperties: + podAuthors: "" + podSummary: PetstoreClient + projectName: PetstoreClient + podHomepage: https://github.com/openapitools/openapi-generator diff --git a/bin/configs/other/typescript-redux-query-default.yaml b/bin/configs/other/typescript-redux-query-default.yaml new file mode 100644 index 0000000000..2cfab47ae9 --- /dev/null +++ b/bin/configs/other/typescript-redux-query-default.yaml @@ -0,0 +1,4 @@ +generatorName: typescript-redux-query +outputDir: samples/client/petstore/typescript-redux-query/builds/default +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/typescript-redux-query diff --git a/bin/configs/perl-deep_module_test.yaml b/bin/configs/perl-deep_module_test.yaml new file mode 100644 index 0000000000..7934a205a0 --- /dev/null +++ b/bin/configs/perl-deep_module_test.yaml @@ -0,0 +1,6 @@ +generatorName: perl +outputDir: samples/client/petstore/perl/deep_module_test +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +additionalProperties: + moduleName: Something::Deep + hideGenerationTimestamp: "true" diff --git a/bin/configs/perl.yaml b/bin/configs/perl.yaml new file mode 100644 index 0000000000..17575b85be --- /dev/null +++ b/bin/configs/perl.yaml @@ -0,0 +1,6 @@ +generatorName: perl +outputDir: samples/client/petstore/perl +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/perl +additionalProperties: + hideGenerationTimestamp: "true" diff --git a/bin/configs/php-OpenAPIClient-oas2.yaml b/bin/configs/php-OpenAPIClient-oas2.yaml new file mode 100644 index 0000000000..d8cf9859d8 --- /dev/null +++ b/bin/configs/php-OpenAPIClient-oas2.yaml @@ -0,0 +1,4 @@ +generatorName: php +outputDir: samples/client/petstore/php/OpenAPIClient-php +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/php diff --git a/bin/configs/php-OpenAPIClient.yaml b/bin/configs/php-OpenAPIClient.yaml new file mode 100644 index 0000000000..a930b52a0c --- /dev/null +++ b/bin/configs/php-OpenAPIClient.yaml @@ -0,0 +1,4 @@ +generatorName: php +outputDir: samples/openapi3/client/petstore/php/OpenAPIClient-php +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/php diff --git a/bin/configs/php-lumen.yaml b/bin/configs/php-lumen.yaml new file mode 100644 index 0000000000..b8c82bc52d --- /dev/null +++ b/bin/configs/php-lumen.yaml @@ -0,0 +1,4 @@ +generatorName: php-lumen +outputDir: samples/server/petstore/php-lumen +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/php-lumen diff --git a/bin/configs/php-silex-deprecated-OpenAPIServer.yaml b/bin/configs/php-silex-deprecated-OpenAPIServer.yaml new file mode 100644 index 0000000000..58e4b4fa11 --- /dev/null +++ b/bin/configs/php-silex-deprecated-OpenAPIServer.yaml @@ -0,0 +1,4 @@ +generatorName: php-silex-deprecated +outputDir: samples/server/petstore/php-silex/OpenAPIServer +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/php-silex diff --git a/bin/configs/php-slim-deprecated-php-slim.yaml b/bin/configs/php-slim-deprecated-php-slim.yaml new file mode 100644 index 0000000000..62342a190f --- /dev/null +++ b/bin/configs/php-slim-deprecated-php-slim.yaml @@ -0,0 +1,4 @@ +generatorName: php-slim-deprecated +outputDir: samples/server/petstore/php-slim +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/php-slim-server diff --git a/bin/configs/php-symfony-SymfonyBundle-php.yaml b/bin/configs/php-symfony-SymfonyBundle-php.yaml new file mode 100644 index 0000000000..c77a71f14b --- /dev/null +++ b/bin/configs/php-symfony-SymfonyBundle-php.yaml @@ -0,0 +1,4 @@ +generatorName: php-symfony +outputDir: samples/server/petstore/php-symfony/SymfonyBundle-php +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/php-symfony diff --git a/bin/configs/php-ze-ph.yaml b/bin/configs/php-ze-ph.yaml new file mode 100644 index 0000000000..b3416dc196 --- /dev/null +++ b/bin/configs/php-ze-ph.yaml @@ -0,0 +1,4 @@ +generatorName: php-ze-ph +outputDir: samples/server/petstore/php-ze-ph +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/php-ze-ph diff --git a/bin/configs/python-aiohttp-srclayout.yaml b/bin/configs/python-aiohttp-srclayout.yaml new file mode 100644 index 0000000000..d376bbf63b --- /dev/null +++ b/bin/configs/python-aiohttp-srclayout.yaml @@ -0,0 +1,6 @@ +generatorName: python-aiohttp +outputDir: samples/server/petstore/python-aiohttp-srclayout +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/python-aiohttp +additionalProperties: + pythonSrcRoot: src diff --git a/bin/configs/python-aiohttp.yaml b/bin/configs/python-aiohttp.yaml new file mode 100644 index 0000000000..2a10c592ae --- /dev/null +++ b/bin/configs/python-aiohttp.yaml @@ -0,0 +1,4 @@ +generatorName: python-aiohttp +outputDir: samples/server/petstore/python-aiohttp +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/python-aiohttp diff --git a/bin/configs/python-asyncio.yaml b/bin/configs/python-asyncio.yaml new file mode 100644 index 0000000000..0a6adf4a2c --- /dev/null +++ b/bin/configs/python-asyncio.yaml @@ -0,0 +1,7 @@ +generatorName: python +outputDir: samples/client/petstore/python-asyncio +library: asyncio +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/python +additionalProperties: + packageName: petstore_api diff --git a/bin/configs/python-blueplanet.yaml b/bin/configs/python-blueplanet.yaml new file mode 100644 index 0000000000..eb38af7fef --- /dev/null +++ b/bin/configs/python-blueplanet.yaml @@ -0,0 +1,4 @@ +generatorName: python-blueplanet +outputDir: samples/server/petstore/python-blueplanet +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/python-blueplanet diff --git a/bin/configs/python-experimental-oas2.yaml b/bin/configs/python-experimental-oas2.yaml new file mode 100644 index 0000000000..7328930e59 --- /dev/null +++ b/bin/configs/python-experimental-oas2.yaml @@ -0,0 +1,7 @@ +generatorName: python-experimental +outputDir: samples/client/petstore/python-experimental +inputSpec: modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/python +additionalProperties: + disallowAdditionalPropertiesIfNotPresent: "true" + packageName: petstore_api diff --git a/bin/configs/python-experimental.yaml b/bin/configs/python-experimental.yaml new file mode 100644 index 0000000000..58aeadafa2 --- /dev/null +++ b/bin/configs/python-experimental.yaml @@ -0,0 +1,6 @@ +generatorName: python-experimental +outputDir: samples/openapi3/client/petstore/python-experimental +inputSpec: modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +templateDir: modules/openapi-generator/src/main/resources/python +additionalProperties: + packageName: petstore_api diff --git a/bin/configs/python-flask-python2.yaml b/bin/configs/python-flask-python2.yaml new file mode 100644 index 0000000000..156caf9c46 --- /dev/null +++ b/bin/configs/python-flask-python2.yaml @@ -0,0 +1,6 @@ +generatorName: python-flask +outputDir: samples/server/petstore/python-flask-python2 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/python-flask +additionalProperties: + supportPython2: true diff --git a/bin/configs/python-flask.yaml b/bin/configs/python-flask.yaml new file mode 100644 index 0000000000..c8bc1d08f5 --- /dev/null +++ b/bin/configs/python-flask.yaml @@ -0,0 +1,4 @@ +generatorName: python-flask +outputDir: samples/server/petstore/python-flask +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/python-flask diff --git a/bin/configs/python-oas2.yaml b/bin/configs/python-oas2.yaml new file mode 100644 index 0000000000..68647095f4 --- /dev/null +++ b/bin/configs/python-oas2.yaml @@ -0,0 +1,6 @@ +generatorName: python +outputDir: samples/client/petstore/python +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/python +additionalProperties: + packageName: petstore_api diff --git a/bin/configs/python-tornado.yaml b/bin/configs/python-tornado.yaml new file mode 100644 index 0000000000..6cee87a07f --- /dev/null +++ b/bin/configs/python-tornado.yaml @@ -0,0 +1,7 @@ +generatorName: python +outputDir: samples/client/petstore/python-tornado +library: tornado +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/python +additionalProperties: + packageName: petstore_api diff --git a/bin/configs/python.yaml b/bin/configs/python.yaml new file mode 100644 index 0000000000..14da7014cf --- /dev/null +++ b/bin/configs/python.yaml @@ -0,0 +1,6 @@ +generatorName: python +outputDir: samples/openapi3/client/petstore/python +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/python +additionalProperties: + packageName: petstore_api diff --git a/bin/configs/r-R.yaml b/bin/configs/r-R.yaml new file mode 100644 index 0000000000..1de2699e1d --- /dev/null +++ b/bin/configs/r-R.yaml @@ -0,0 +1,6 @@ +generatorName: r +outputDir: samples/client/petstore/R +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/r +additionalProperties: + packageName: petstore diff --git a/bin/configs/ruby-faraday.yaml b/bin/configs/ruby-faraday.yaml new file mode 100644 index 0000000000..b289ae977f --- /dev/null +++ b/bin/configs/ruby-faraday.yaml @@ -0,0 +1,10 @@ +generatorName: ruby +outputDir: samples/client/petstore/ruby-faraday +library: faraday +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/ruby-client +additionalProperties: + gemVersion: 1.0.0 + moduleName: Petstore + gemName: petstore + skipFormModel: "true" diff --git a/bin/configs/ruby.yaml b/bin/configs/ruby.yaml new file mode 100644 index 0000000000..1a7e2c2436 --- /dev/null +++ b/bin/configs/ruby.yaml @@ -0,0 +1,11 @@ +generatorName: ruby +outputDir: samples/client/petstore/ruby +library: typhoeus +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/ruby-client +additionalProperties: + gemVersion: 1.0.0 + moduleName: Petstore + gemName: petstore + skipFormModel: "true" +strictSpecBehavior: false diff --git a/bin/configs/rust-server-multipart-v3.yaml b/bin/configs/rust-server-multipart-v3.yaml new file mode 100644 index 0000000000..ca84dfb04e --- /dev/null +++ b/bin/configs/rust-server-multipart-v3.yaml @@ -0,0 +1,8 @@ +generatorName: rust-server +outputDir: samples/server/petstore/rust-server/output/multipart-v3 +inputSpec: modules/openapi-generator/src/test/resources/3_0/rust-server/multipart-v3.yaml +templateDir: modules/openapi-generator/src/main/resources/rust-server +generateAliasAsModel: true +additionalProperties: + hideGenerationTimestamp: "true" + packageName: multipart-v3 diff --git a/bin/configs/rust-server-no-example-v3.yaml b/bin/configs/rust-server-no-example-v3.yaml new file mode 100644 index 0000000000..5694c8373e --- /dev/null +++ b/bin/configs/rust-server-no-example-v3.yaml @@ -0,0 +1,8 @@ +generatorName: rust-server +outputDir: samples/server/petstore/rust-server/output/no-example-v3 +inputSpec: modules/openapi-generator/src/test/resources/3_0/rust-server/no-example-v3.yaml +templateDir: modules/openapi-generator/src/main/resources/rust-server +generateAliasAsModel: true +additionalProperties: + hideGenerationTimestamp: "true" + packageName: no-example-v3 diff --git a/bin/configs/rust-server-openapi-v3.yaml b/bin/configs/rust-server-openapi-v3.yaml new file mode 100644 index 0000000000..6ed1c29466 --- /dev/null +++ b/bin/configs/rust-server-openapi-v3.yaml @@ -0,0 +1,8 @@ +generatorName: rust-server +outputDir: samples/server/petstore/rust-server/output/openapi-v3 +inputSpec: modules/openapi-generator/src/test/resources/3_0/rust-server/openapi-v3.yaml +templateDir: modules/openapi-generator/src/main/resources/rust-server +generateAliasAsModel: true +additionalProperties: + hideGenerationTimestamp: "true" + packageName: openapi-v3 diff --git a/bin/configs/rust-server-ops-v3.yaml b/bin/configs/rust-server-ops-v3.yaml new file mode 100644 index 0000000000..5d8f47cea4 --- /dev/null +++ b/bin/configs/rust-server-ops-v3.yaml @@ -0,0 +1,8 @@ +generatorName: rust-server +outputDir: samples/server/petstore/rust-server/output/ops-v3 +inputSpec: modules/openapi-generator/src/test/resources/3_0/rust-server/ops-v3.yaml +templateDir: modules/openapi-generator/src/main/resources/rust-server +generateAliasAsModel: true +additionalProperties: + hideGenerationTimestamp: "true" + packageName: ops-v3 diff --git a/bin/configs/rust-server-petstore-with-fake-endpoints-models-for-testing.yaml b/bin/configs/rust-server-petstore-with-fake-endpoints-models-for-testing.yaml new file mode 100644 index 0000000000..c0f47a6063 --- /dev/null +++ b/bin/configs/rust-server-petstore-with-fake-endpoints-models-for-testing.yaml @@ -0,0 +1,8 @@ +generatorName: rust-server +outputDir: samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing +inputSpec: modules/openapi-generator/src/test/resources/2_0/rust-server/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/rust-server +generateAliasAsModel: true +additionalProperties: + hideGenerationTimestamp: "true" + packageName: petstore-with-fake-endpoints-models-for-testing diff --git a/bin/configs/rust-server-test.yaml b/bin/configs/rust-server-test.yaml new file mode 100644 index 0000000000..522a66ad22 --- /dev/null +++ b/bin/configs/rust-server-test.yaml @@ -0,0 +1,8 @@ +generatorName: rust-server +outputDir: samples/server/petstore/rust-server/output/rust-server-test +inputSpec: modules/openapi-generator/src/test/resources/2_0/rust-server/rust-server-test.yaml +templateDir: modules/openapi-generator/src/main/resources/rust-server +generateAliasAsModel: true +additionalProperties: + hideGenerationTimestamp: "true" + packageName: rust-server-test diff --git a/bin/configs/scala-akka.yaml b/bin/configs/scala-akka.yaml new file mode 100644 index 0000000000..0a22803ca9 --- /dev/null +++ b/bin/configs/scala-akka.yaml @@ -0,0 +1,6 @@ +generatorName: scala-akka +outputDir: samples/client/petstore/scala-akka +inputSpec: modules/openapi-generator/src/test/resources/3_0/scala-akka/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/scala-akka-client +additionalProperties: + artifactId: scala-akka-petstore-client diff --git a/bin/configs/scala-sttp.yaml b/bin/configs/scala-sttp.yaml new file mode 100644 index 0000000000..01e211c9a7 --- /dev/null +++ b/bin/configs/scala-sttp.yaml @@ -0,0 +1,6 @@ +generatorName: scala-sttp +outputDir: samples/client/petstore/scala-sttp +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/scala-sttp +additionalProperties: + artifactId: scala-sttp-petstore diff --git a/bin/configs/spring-boot-beanvalidation.yaml b/bin/configs/spring-boot-beanvalidation.yaml new file mode 100644 index 0000000000..6b39c85dc9 --- /dev/null +++ b/bin/configs/spring-boot-beanvalidation.yaml @@ -0,0 +1,10 @@ +generatorName: spring +outputDir: samples/server/petstore/springboot-beanvalidation +library: spring-boot +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + java8: "false" + useBeanValidation: true + artifactId: spring-boot-beanvalidation + hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-boot-delegate-j8.yaml b/bin/configs/spring-boot-delegate-j8.yaml new file mode 100644 index 0000000000..a90e8b3ce1 --- /dev/null +++ b/bin/configs/spring-boot-delegate-j8.yaml @@ -0,0 +1,8 @@ +generatorName: spring +outputDir: samples/server/petstore/springboot-delegate-j8 +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + artifactId: springboot-delegate-j8 + hideGenerationTimestamp: "true" + delegatePattern: "true" diff --git a/bin/configs/spring-boot-delegate.yaml b/bin/configs/spring-boot-delegate.yaml new file mode 100644 index 0000000000..26b65d17ba --- /dev/null +++ b/bin/configs/spring-boot-delegate.yaml @@ -0,0 +1,9 @@ +generatorName: spring +outputDir: samples/server/petstore/springboot-delegate +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + artifactId: springboot-delegate + hideGenerationTimestamp: "true" + java8: "false" + delegatePattern: "true" diff --git a/bin/configs/spring-boot-implicitHeaders.yaml b/bin/configs/spring-boot-implicitHeaders.yaml new file mode 100644 index 0000000000..cb84abe664 --- /dev/null +++ b/bin/configs/spring-boot-implicitHeaders.yaml @@ -0,0 +1,8 @@ +generatorName: spring +outputDir: samples/server/petstore/springboot-implicitHeaders +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + artifactId: springboot-implicitHeaders + hideGenerationTimestamp: "true" + implicitHeaders: true diff --git a/bin/configs/spring-boot-reactive.yaml b/bin/configs/spring-boot-reactive.yaml new file mode 100644 index 0000000000..3d0c92edbe --- /dev/null +++ b/bin/configs/spring-boot-reactive.yaml @@ -0,0 +1,9 @@ +generatorName: spring +outputDir: samples/server/petstore/springboot-reactive +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + artifactId: springboot-reactive + reactive: "true" + hideGenerationTimestamp: "true" + delegatePattern: "true" diff --git a/bin/configs/spring-boot-useoptional.yaml b/bin/configs/spring-boot-useoptional.yaml new file mode 100644 index 0000000000..93a7924dcb --- /dev/null +++ b/bin/configs/spring-boot-useoptional.yaml @@ -0,0 +1,8 @@ +generatorName: spring +outputDir: samples/server/petstore/springboot-useoptional +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + useOptional: true + artifactId: spring-boot-useoptional + hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-boot-virtualan.yaml b/bin/configs/spring-boot-virtualan.yaml new file mode 100644 index 0000000000..3d580d05c8 --- /dev/null +++ b/bin/configs/spring-boot-virtualan.yaml @@ -0,0 +1,11 @@ +generatorName: spring +outputDir: samples/server/petstore/springboot-virtualan +library: spring-boot +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + apiPackage: org.openapitools.virtualan.api + modelPackage: org.openapitools.virtualan.model + virtualService: true + artifactId: springboot-virtualan + hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-boot.yaml b/bin/configs/spring-boot.yaml new file mode 100644 index 0000000000..f752bc817e --- /dev/null +++ b/bin/configs/spring-boot.yaml @@ -0,0 +1,8 @@ +generatorName: spring +outputDir: samples/server/petstore/springboot +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + artifactId: springboot + snapshotVersion: "true" + hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-cloud-async.yaml b/bin/configs/spring-cloud-async.yaml new file mode 100644 index 0000000000..3275e4ac03 --- /dev/null +++ b/bin/configs/spring-cloud-async.yaml @@ -0,0 +1,10 @@ +generatorName: spring +outputDir: samples/client/petstore/spring-cloud-async +library: spring-cloud +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud +additionalProperties: + async: "true" + java8: "true" + artifactId: petstore-spring-cloud + hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-cloud.yaml b/bin/configs/spring-cloud.yaml new file mode 100644 index 0000000000..387c9e82a9 --- /dev/null +++ b/bin/configs/spring-cloud.yaml @@ -0,0 +1,9 @@ +generatorName: spring +outputDir: samples/client/petstore/spring-cloud +library: spring-cloud +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud +additionalProperties: + artifactId: petstore-spring-cloud + responseWrapper: HystrixCommand + hideGenerationTimestamp: "true" diff --git a/bin/configs/spring-mvc-j8-async.yaml b/bin/configs/spring-mvc-j8-async.yaml new file mode 100644 index 0000000000..cd03b0e427 --- /dev/null +++ b/bin/configs/spring-mvc-j8-async.yaml @@ -0,0 +1,11 @@ +generatorName: spring +outputDir: samples/server/petstore/spring-mvc-j8-async +library: spring-mvc +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + async: "true" + java8: true + artifactId: spring-mvc-server-j8-async + hideGenerationTimestamp: "true" + serverPort: "8002" diff --git a/bin/configs/spring-mvc-j8-localdatetime.yaml b/bin/configs/spring-mvc-j8-localdatetime.yaml new file mode 100644 index 0000000000..f8d6126c9f --- /dev/null +++ b/bin/configs/spring-mvc-j8-localdatetime.yaml @@ -0,0 +1,11 @@ +generatorName: spring +outputDir: samples/server/petstore/spring-mvc-j8-localdatetime +library: spring-mvc +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + booleanGetterPrefix: get + artifactId: spring-mvc-j8-localdatetime + hideGenerationTimestamp: "true" + serverPort: "8002" + dateLibrary: java8-localdatetime diff --git a/bin/configs/spring-mvc.yaml b/bin/configs/spring-mvc.yaml new file mode 100644 index 0000000000..11b49a4ecb --- /dev/null +++ b/bin/configs/spring-mvc.yaml @@ -0,0 +1,11 @@ +generatorName: spring +outputDir: samples/server/petstore/spring-mvc +library: spring-mvc +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml +templateDir: modules/openapi-generator/src/main/resources/JavaSpring +additionalProperties: + java8: "false" + booleanGetterPrefix: get + artifactId: spring-mvc-server + hideGenerationTimestamp: "true" + serverPort: "8002" diff --git a/bin/configs/spring-stubs.yaml b/bin/configs/spring-stubs.yaml new file mode 100644 index 0000000000..335fdcb4a7 --- /dev/null +++ b/bin/configs/spring-stubs.yaml @@ -0,0 +1,8 @@ +generatorName: spring +outputDir: samples/client/petstore/spring-stubs +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + artifactId: spring-stubs + interfaceOnly: "true" + singleContentTypes: "true" + hideGenerationTimestamp: "true" diff --git a/bin/configs/typescript-angular-default-v6.yaml b/bin/configs/typescript-angular-default-v6.yaml new file mode 100644 index 0000000000..664aa59a3c --- /dev/null +++ b/bin/configs/typescript-angular-default-v6.yaml @@ -0,0 +1,6 @@ +generatorName: typescript-angular +outputDir: samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + ngVersion: 6.0.0 + providedInRoot: "false" diff --git a/bin/configs/typescript-angular-single-request-parameter-v8.yaml b/bin/configs/typescript-angular-single-request-parameter-v8.yaml new file mode 100644 index 0000000000..c9978cc4ae --- /dev/null +++ b/bin/configs/typescript-angular-single-request-parameter-v8.yaml @@ -0,0 +1,10 @@ +generatorName: typescript-angular +outputDir: samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + npmVersion: 1.0.0 + ngVersion: 8.0.0 + npmName: '@openapitools/typescript-angular-petstore' + npmRepository: https://skimdb.npmjs.com/registry + useSingleRequestParameter: "true" + snapshot: false diff --git a/bin/configs/typescript-angular-v6-provided-in-root-with-npm.yaml b/bin/configs/typescript-angular-v6-provided-in-root-with-npm.yaml new file mode 100644 index 0000000000..8bb13b8eac --- /dev/null +++ b/bin/configs/typescript-angular-v6-provided-in-root-with-npm.yaml @@ -0,0 +1,9 @@ +generatorName: typescript-angular +outputDir: samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + ngVersion: 6.0.0 + npmVersion: 1.0.0 + npmName: '@openapitools/angular2-typescript-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/bin/configs/typescript-angular-v6-provided-in-root.yaml b/bin/configs/typescript-angular-v6-provided-in-root.yaml new file mode 100644 index 0000000000..3668005467 --- /dev/null +++ b/bin/configs/typescript-angular-v6-provided-in-root.yaml @@ -0,0 +1,5 @@ +generatorName: typescript-angular +outputDir: samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + ngVersion: 6.0.0 diff --git a/bin/configs/typescript-angular-v7-not-provided-in-root-with-npm.yaml b/bin/configs/typescript-angular-v7-not-provided-in-root-with-npm.yaml new file mode 100644 index 0000000000..ac73ad65f9 --- /dev/null +++ b/bin/configs/typescript-angular-v7-not-provided-in-root-with-npm.yaml @@ -0,0 +1,11 @@ +generatorName: typescript-angular +outputDir: samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + ngVersion: 7.0.0 + npmVersion: 1.0.0 + providedInRoot: "false" + stringEnums: "true" + npmName: '@openapitools/typescript-angular-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false \ No newline at end of file diff --git a/bin/configs/typescript-angular-v7-not-provided-in-root.yaml b/bin/configs/typescript-angular-v7-not-provided-in-root.yaml new file mode 100644 index 0000000000..83d16bcefb --- /dev/null +++ b/bin/configs/typescript-angular-v7-not-provided-in-root.yaml @@ -0,0 +1,6 @@ +generatorName: typescript-angular +outputDir: samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + ngVersion: 7.0.0 + providedInRoot: "false" \ No newline at end of file diff --git a/bin/configs/typescript-angular-v7-provided-in-root-with-npm.yaml b/bin/configs/typescript-angular-v7-provided-in-root-with-npm.yaml new file mode 100644 index 0000000000..6ae7f19ad4 --- /dev/null +++ b/bin/configs/typescript-angular-v7-provided-in-root-with-npm.yaml @@ -0,0 +1,9 @@ +generatorName: typescript-angular +outputDir: samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + ngVersion: 7.0.0 + npmVersion: 1.0.0 + npmName: '@openapitools/typescript-angular-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/bin/configs/typescript-angular-v7-provided-in-root.yaml b/bin/configs/typescript-angular-v7-provided-in-root.yaml new file mode 100644 index 0000000000..5a22f83d84 --- /dev/null +++ b/bin/configs/typescript-angular-v7-provided-in-root.yaml @@ -0,0 +1,5 @@ +generatorName: typescript-angular +outputDir: samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + ngVersion: 7.0.0 diff --git a/bin/configs/typescript-angular-with-npm-v6.yaml b/bin/configs/typescript-angular-with-npm-v6.yaml new file mode 100644 index 0000000000..c8bcfc4889 --- /dev/null +++ b/bin/configs/typescript-angular-with-npm-v6.yaml @@ -0,0 +1,10 @@ +generatorName: typescript-angular +outputDir: samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + npmVersion: 1.0.0 + ngVersion: 6.0.0 + providedInRoot: "false" + npmName: '@openapitools/typescript-angular-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/bin/configs/typescript-angular-with-npm-v8.yaml b/bin/configs/typescript-angular-with-npm-v8.yaml new file mode 100644 index 0000000000..48849517fc --- /dev/null +++ b/bin/configs/typescript-angular-with-npm-v8.yaml @@ -0,0 +1,9 @@ +generatorName: typescript-angular +outputDir: samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + npmVersion: 1.0.0 + ngVersion: 8.0.0 + npmName: '@openapitools/typescript-angular-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/bin/configs/typescript-angular-with-prefixed-module-name-v8.yaml b/bin/configs/typescript-angular-with-prefixed-module-name-v8.yaml new file mode 100644 index 0000000000..b7cf4fd45e --- /dev/null +++ b/bin/configs/typescript-angular-with-prefixed-module-name-v8.yaml @@ -0,0 +1,10 @@ +generatorName: typescript-angular +outputDir: samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + npmVersion: 1.0.0 + ngVersion: 8.0.0 + npmName: '@openapitools/typescript-angular-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false + apiModulePrefix: PetStore diff --git a/bin/configs/typescript-angularjs.yaml b/bin/configs/typescript-angularjs.yaml new file mode 100644 index 0000000000..afaf8f53e8 --- /dev/null +++ b/bin/configs/typescript-angularjs.yaml @@ -0,0 +1,3 @@ +generatorName: typescript-angularjs +outputDir: samples/client/petstore/typescript-angularjs +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml diff --git a/bin/configs/typescript-aurelia-default.yaml b/bin/configs/typescript-aurelia-default.yaml new file mode 100644 index 0000000000..c0b70a6ad9 --- /dev/null +++ b/bin/configs/typescript-aurelia-default.yaml @@ -0,0 +1,3 @@ +generatorName: typescript-aurelia +outputDir: samples/client/petstore/typescript-aurelia/default +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml diff --git a/bin/configs/typescript-axios-composed-schemas.yaml b/bin/configs/typescript-axios-composed-schemas.yaml new file mode 100644 index 0000000000..c9bea94bba --- /dev/null +++ b/bin/configs/typescript-axios-composed-schemas.yaml @@ -0,0 +1,3 @@ +generatorName: typescript-axios +outputDir: samples/client/petstore/typescript-axios/builds/composed-schemas +inputSpec: modules/openapi-generator/src/test/resources/3_0/composed-schemas.yaml diff --git a/bin/configs/typescript-axios-default.yaml b/bin/configs/typescript-axios-default.yaml new file mode 100644 index 0000000000..5b3c9488a8 --- /dev/null +++ b/bin/configs/typescript-axios-default.yaml @@ -0,0 +1,3 @@ +generatorName: typescript-axios +outputDir: samples/client/petstore/typescript-axios/builds/default +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml diff --git a/bin/configs/typescript-axios-es6-target.yaml b/bin/configs/typescript-axios-es6-target.yaml new file mode 100644 index 0000000000..79b61fdaff --- /dev/null +++ b/bin/configs/typescript-axios-es6-target.yaml @@ -0,0 +1,9 @@ +generatorName: typescript-axios +outputDir: samples/client/petstore/typescript-axios/builds/es6-target +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + npmVersion: 1.0.0 + supportsES6: true + npmName: '@openapitools/typescript-axios-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/bin/configs/typescript-axios-with-complex-headers.yaml b/bin/configs/typescript-axios-with-complex-headers.yaml new file mode 100644 index 0000000000..c88e7a15d8 --- /dev/null +++ b/bin/configs/typescript-axios-with-complex-headers.yaml @@ -0,0 +1,3 @@ +generatorName: typescript-axios +outputDir: samples/client/petstore/typescript-axios/builds/with-complex-headers +inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-complex-headers.yaml diff --git a/bin/configs/typescript-axios-with-interfaces.yaml b/bin/configs/typescript-axios-with-interfaces.yaml new file mode 100644 index 0000000000..11337d0035 --- /dev/null +++ b/bin/configs/typescript-axios-with-interfaces.yaml @@ -0,0 +1,5 @@ +generatorName: typescript-axios +outputDir: samples/client/petstore/typescript-axios/builds/with-interfaces +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + withInterfaces: "true" diff --git a/bin/configs/typescript-axios-with-npm-version-and-separate-models-and-api.yaml b/bin/configs/typescript-axios-with-npm-version-and-separate-models-and-api.yaml new file mode 100644 index 0000000000..48186cc062 --- /dev/null +++ b/bin/configs/typescript-axios-with-npm-version-and-separate-models-and-api.yaml @@ -0,0 +1,11 @@ +generatorName: typescript-axios +outputDir: samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + npmVersion: 1.0.0 + apiPackage: api.another.level + modelPackage: model.some.levels.deep + withSeparateModelsAndApi: true + npmName: '@openapitools/typescript-axios-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/bin/configs/typescript-axios-with-npm-version.yaml b/bin/configs/typescript-axios-with-npm-version.yaml new file mode 100644 index 0000000000..8602cac04d --- /dev/null +++ b/bin/configs/typescript-axios-with-npm-version.yaml @@ -0,0 +1,8 @@ +generatorName: typescript-axios +outputDir: samples/client/petstore/typescript-axios/builds/with-npm-version +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + npmVersion: 1.0.0 + npmName: '@openapitools/typescript-axios-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/bin/configs/typescript-axios-with-single-request-parameters.yaml b/bin/configs/typescript-axios-with-single-request-parameters.yaml new file mode 100644 index 0000000000..9239c63293 --- /dev/null +++ b/bin/configs/typescript-axios-with-single-request-parameters.yaml @@ -0,0 +1,5 @@ +generatorName: typescript-axios +outputDir: samples/client/petstore/typescript-axios/builds/with-single-request-parameters +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-operations-without-required-params.yaml +additionalProperties: + useSingleRequestParameter: "true" diff --git a/bin/configs/typescript-fetch-default.yaml b/bin/configs/typescript-fetch-default.yaml new file mode 100644 index 0000000000..85301d86bb --- /dev/null +++ b/bin/configs/typescript-fetch-default.yaml @@ -0,0 +1,3 @@ +generatorName: typescript-fetch +outputDir: samples/client/petstore/typescript-fetch/builds/default +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml diff --git a/bin/configs/typescript-fetch-es6-target.yaml b/bin/configs/typescript-fetch-es6-target.yaml new file mode 100644 index 0000000000..aea1ad3184 --- /dev/null +++ b/bin/configs/typescript-fetch-es6-target.yaml @@ -0,0 +1,9 @@ +generatorName: typescript-fetch +outputDir: samples/client/petstore/typescript-fetch/builds/es6-target +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + npmVersion: 1.0.0 + supportsES6: true + npmName: '@openapitools/typescript-fetch-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/bin/configs/typescript-fetch-multiple-parameters.yaml b/bin/configs/typescript-fetch-multiple-parameters.yaml new file mode 100644 index 0000000000..0bc52605c2 --- /dev/null +++ b/bin/configs/typescript-fetch-multiple-parameters.yaml @@ -0,0 +1,6 @@ +generatorName: typescript-fetch +outputDir: samples/client/petstore/typescript-fetch/builds/multiple-parameters +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + useSingleRequestParameter: false + snapshot: false diff --git a/bin/configs/typescript-fetch-prefix-parameter-interfaces.yaml b/bin/configs/typescript-fetch-prefix-parameter-interfaces.yaml new file mode 100644 index 0000000000..27334256aa --- /dev/null +++ b/bin/configs/typescript-fetch-prefix-parameter-interfaces.yaml @@ -0,0 +1,9 @@ +generatorName: typescript-fetch +outputDir: samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + npmVersion: 1.0.0 + npmName: '@openapitools/typescript-fetch-petstore' + npmRepository: https://skimdb.npmjs.com/registry + prefixParameterInterfaces: true + snapshot: false diff --git a/bin/configs/typescript-fetch-typescript-three-plus.yaml b/bin/configs/typescript-fetch-typescript-three-plus.yaml new file mode 100644 index 0000000000..a18d0d8adb --- /dev/null +++ b/bin/configs/typescript-fetch-typescript-three-plus.yaml @@ -0,0 +1,9 @@ +generatorName: typescript-fetch +outputDir: samples/client/petstore/typescript-fetch/builds/typescript-three-plus +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + npmVersion: 1.0.0 + npmName: '@openapitools/typescript-fetch-petstore' + npmRepository: https://skimdb.npmjs.com/registry + typescriptThreePlus: true + snapshot: false diff --git a/bin/configs/typescript-fetch-with-interfaces.yaml b/bin/configs/typescript-fetch-with-interfaces.yaml new file mode 100644 index 0000000000..e0e84f57d1 --- /dev/null +++ b/bin/configs/typescript-fetch-with-interfaces.yaml @@ -0,0 +1,5 @@ +generatorName: typescript-fetch +outputDir: samples/client/petstore/typescript-fetch/builds/with-interfaces +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + withInterfaces: "true" diff --git a/bin/configs/typescript-fetch-with-npm-version.yaml b/bin/configs/typescript-fetch-with-npm-version.yaml new file mode 100644 index 0000000000..35e2c2a2d3 --- /dev/null +++ b/bin/configs/typescript-fetch-with-npm-version.yaml @@ -0,0 +1,8 @@ +generatorName: typescript-fetch +outputDir: samples/client/petstore/typescript-fetch/builds/with-npm-version +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + npmVersion: 1.0.0 + npmName: '@openapitools/typescript-fetch-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/bin/configs/typescript-inversify.yaml b/bin/configs/typescript-inversify.yaml new file mode 100644 index 0000000000..de2fe10c96 --- /dev/null +++ b/bin/configs/typescript-inversify.yaml @@ -0,0 +1,3 @@ +generatorName: typescript-inversify +outputDir: samples/client/petstore/typescript-inversify +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml diff --git a/bin/configs/typescript-jquery-default.yaml b/bin/configs/typescript-jquery-default.yaml new file mode 100644 index 0000000000..77758d8e45 --- /dev/null +++ b/bin/configs/typescript-jquery-default.yaml @@ -0,0 +1,3 @@ +generatorName: typescript-jquery +outputDir: samples/client/petstore/typescript-jquery/default +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml diff --git a/bin/configs/typescript-jquery-npm.yaml b/bin/configs/typescript-jquery-npm.yaml new file mode 100644 index 0000000000..a0e53ec13e --- /dev/null +++ b/bin/configs/typescript-jquery-npm.yaml @@ -0,0 +1,8 @@ +generatorName: typescript-jquery +outputDir: samples/client/petstore/typescript-jquery/npm +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + npmVersion: 0.0.1 + npmName: '@openapitools/jquery-typescript-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/bin/configs/typescript-node-default.yaml b/bin/configs/typescript-node-default.yaml new file mode 100644 index 0000000000..0b7bcafa07 --- /dev/null +++ b/bin/configs/typescript-node-default.yaml @@ -0,0 +1,3 @@ +generatorName: typescript-node +outputDir: samples/client/petstore/typescript-node/default +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml diff --git a/bin/configs/typescript-node-npm.yaml b/bin/configs/typescript-node-npm.yaml new file mode 100644 index 0000000000..06dafcad37 --- /dev/null +++ b/bin/configs/typescript-node-npm.yaml @@ -0,0 +1,8 @@ +generatorName: typescript-node +outputDir: samples/client/petstore/typescript-node/npm +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + npmVersion: 0.0.1 + npmName: '@openapitools/node-typescript-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/bin/configs/typescript-redux-query-with-npm-version.yaml b/bin/configs/typescript-redux-query-with-npm-version.yaml new file mode 100644 index 0000000000..1db6557857 --- /dev/null +++ b/bin/configs/typescript-redux-query-with-npm-version.yaml @@ -0,0 +1,9 @@ +generatorName: typescript-redux-query +outputDir: samples/client/petstore/typescript-redux-query/builds/with-npm-version +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +templateDir: modules/openapi-generator/src/main/resources/typescript-redux-query +additionalProperties: + npmVersion: 1.0.0 + npmName: '@openapitools/typescript-redux-query-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/bin/configs/typescript-rxjs-default.yaml b/bin/configs/typescript-rxjs-default.yaml new file mode 100644 index 0000000000..e2006a1ab3 --- /dev/null +++ b/bin/configs/typescript-rxjs-default.yaml @@ -0,0 +1,3 @@ +generatorName: typescript-rxjs +outputDir: samples/client/petstore/typescript-rxjs/builds/default +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml diff --git a/bin/configs/typescript-rxjs-es6-target.yaml b/bin/configs/typescript-rxjs-es6-target.yaml new file mode 100644 index 0000000000..cb40131cee --- /dev/null +++ b/bin/configs/typescript-rxjs-es6-target.yaml @@ -0,0 +1,9 @@ +generatorName: typescript-rxjs +outputDir: samples/client/petstore/typescript-rxjs/builds/es6-target +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + npmVersion: 1.0.0 + supportsES6: true + npmName: '@openapitools/typescript-rxjs-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/bin/configs/typescript-rxjs-with-interfaces.yaml b/bin/configs/typescript-rxjs-with-interfaces.yaml new file mode 100644 index 0000000000..a5ef676abc --- /dev/null +++ b/bin/configs/typescript-rxjs-with-interfaces.yaml @@ -0,0 +1,5 @@ +generatorName: typescript-rxjs +outputDir: samples/client/petstore/typescript-rxjs/builds/with-interfaces +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + withInterfaces: "true" diff --git a/bin/configs/typescript-rxjs-with-npm-version.yaml b/bin/configs/typescript-rxjs-with-npm-version.yaml new file mode 100644 index 0000000000..4d2fd37f8f --- /dev/null +++ b/bin/configs/typescript-rxjs-with-npm-version.yaml @@ -0,0 +1,8 @@ +generatorName: typescript-rxjs +outputDir: samples/client/petstore/typescript-rxjs/builds/with-npm-version +inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore.yaml +additionalProperties: + npmVersion: 1.0.0 + npmName: '@openapitools/typescript-rxjs-petstore' + npmRepository: https://skimdb.npmjs.com/registry + snapshot: false diff --git a/bin/cpp-pistache-server-petstore.sh b/bin/cpp-pistache-server-petstore.sh deleted file mode 100755 index 7f2c734b68..0000000000 --- a/bin/cpp-pistache-server-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -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 -g cpp-pistache-server -t modules/openapi-generator/src/main/resources/cpp-pistache-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml --additional-properties addExternalLibs=true --additional-properties useStructModel=false -o samples/server/petstore/cpp-pistache $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/cpp-qt5-petstore.json b/bin/cpp-qt5-petstore.json deleted file mode 100644 index b27f55f17f..0000000000 --- a/bin/cpp-qt5-petstore.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "inputSpec": "modules/openapi-generator/src/test/resources/2_0/petstore.yaml", - "outputDir": "samples/client/petstore/cpp-qt5", - "additionalProperties": { - "cppNamespace": "test_namespace", - "modelNamePrefix": "PFX" - } -} diff --git a/bin/cpp-qt5-petstore.sh b/bin/cpp-qt5-petstore.sh deleted file mode 100755 index 68fb506a63..0000000000 --- a/bin/cpp-qt5-petstore.sh +++ /dev/null @@ -1,36 +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" -args="generate -t modules/openapi-generator/src/main/resources/cpp-qt5-client \ - -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml \ - -g cpp-qt5-client \ - -c bin/cpp-qt5-petstore.json \ - $@" - -java $JAVA_OPTS -jar $executable $args diff --git a/bin/cpp-qt5-qhttpengine-server-petstore.sh b/bin/cpp-qt5-qhttpengine-server-petstore.sh deleted file mode 100755 index 9425c273ce..0000000000 --- a/bin/cpp-qt5-qhttpengine-server-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/cpp-qt5-qhttpengine-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-qt5-qhttpengine-server -o samples/server/petstore/cpp-qt5-qhttpengine-server $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/cpp-restbed-petstore-server.sh b/bin/cpp-restbed-petstore-server.sh deleted file mode 100755 index 5a61f5e8c8..0000000000 --- a/bin/cpp-restbed-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -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 -g cpp-restbed-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -o samples/server/petstore/cpp-restbed $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/cpp-restsdk-petstore.sh b/bin/cpp-restsdk-petstore.sh deleted file mode 100755 index ad9090d0b5..0000000000 --- a/bin/cpp-restsdk-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/cpp-rest-sdk-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-restsdk -o samples/client/petstore/cpp-restsdk/client $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/cpp-tizen-petstore.sh b/bin/cpp-tizen-petstore.sh deleted file mode 100755 index 4a280974fa..0000000000 --- a/bin/cpp-tizen-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/cpp-tizen-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-tizen -o samples/client/petstore/cpp-tizen $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/cpp-ue4-petstore.sh b/bin/cpp-ue4-petstore.sh deleted file mode 100755 index 9eeab274c8..0000000000 --- a/bin/cpp-ue4-petstore.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="$@ generate -t modules/openapi-generator/src/main/resources/cpp-ue4 -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g cpp-ue4 -o samples/client/petstore/cpp-ue4" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/csharp-dotnet2-petstore.sh b/bin/csharp-dotnet2-petstore.sh deleted file mode 100755 index c953170bfa..0000000000 --- a/bin/csharp-dotnet2-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g csharp-dotnet2 -t modules/openapi-generator/src/main/resources/csharp-dotnet2 -o samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/csharp-netcore-petstore-all.sh b/bin/csharp-netcore-petstore-all.sh deleted file mode 100755 index 6db67b5e0e..0000000000 --- a/bin/csharp-netcore-petstore-all.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# C# Petstore API client .NET Standard 2.0 -./bin/csharp-netcore-petstore.sh - -# C# Petstore API client .NET Core 2.0 -./bin/csharp-netcore-petstore-netcore.sh diff --git a/bin/csharp-netcore-petstore-netcore.sh b/bin/csharp-netcore-petstore-netcore.sh deleted file mode 100755 index 8f2e482406..0000000000 --- a/bin/csharp-netcore-petstore-netcore.sh +++ /dev/null @@ -1,38 +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" -outdir="samples/client/petstore/csharp-netcore/OpenAPIClientCore" - -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/csharp-netcore/ -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp-netcore -o ${outdir} --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C},useCompareNetObjects=true,targetFramework=netcoreapp2.0 $@" - -java $JAVA_OPTS -jar $executable $ags - -# restore csproj file -echo "restore csproject file: CI/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj" -cp ./CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj ./samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools.Test/ - diff --git a/bin/csharp-netcore-petstore.sh b/bin/csharp-netcore-petstore.sh deleted file mode 100755 index a525806f4d..0000000000 --- a/bin/csharp-netcore-petstore.sh +++ /dev/null @@ -1,37 +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/csharp-netcore/ -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp-netcore -o samples/client/petstore/csharp-netcore/OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C},useCompareNetObjects=true $@" - -java $JAVA_OPTS -jar $executable $ags - -# restore csproj file -echo "restore csproject file: CI/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj" -cp ./CI/samples.ci/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj ./samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools.Test/ - diff --git a/bin/csharp-petstore-all.sh b/bin/csharp-petstore-all.sh deleted file mode 100755 index 022d1713bb..0000000000 --- a/bin/csharp-petstore-all.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# C# Petstore API client (.NET 3.5) -./bin/csharp-petstore.sh - -# C# Petstore API client with PropertyChanged -./bin/csharp-property-changed-petstore.sh - -# C# Petstore API client (.net standarnd 1.3+) -./bin/csharp-petstore-net-standard.sh - -# C# Petstore API client (.NET 4.0) -./bin/csharp-petstore-net-40.sh - -# C# Petstore API client (.NET 3.5) -./bin/csharp-petstore-net-35.sh - diff --git a/bin/csharp-petstore-net-35.json b/bin/csharp-petstore-net-35.json deleted file mode 100644 index 8d3ade9cd8..0000000000 --- a/bin/csharp-petstore-net-35.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "targetFramework": "v3.5" -} diff --git a/bin/csharp-petstore-net-35.sh b/bin/csharp-petstore-net-35.sh deleted file mode 100755 index 0096db9dbd..0000000000 --- a/bin/csharp-petstore-net-35.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClientNet35 --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} -c ./bin/csharp-petstore-net-35.json $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/csharp-petstore-net-40.json b/bin/csharp-petstore-net-40.json deleted file mode 100644 index 884f7ea9bc..0000000000 --- a/bin/csharp-petstore-net-40.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "targetFramework": "v4.0" -} diff --git a/bin/csharp-petstore-net-40.sh b/bin/csharp-petstore-net-40.sh deleted file mode 100755 index a816c28d0b..0000000000 --- a/bin/csharp-petstore-net-40.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClientNet40 --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} -c ./bin/csharp-petstore-net-40.json $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/csharp-petstore-net-standard.json b/bin/csharp-petstore-net-standard.json deleted file mode 100644 index d6e7bb02d9..0000000000 --- a/bin/csharp-petstore-net-standard.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "targetFramework": "netstandard1.3" -} diff --git a/bin/csharp-petstore-net-standard.sh b/bin/csharp-petstore-net-standard.sh deleted file mode 100755 index a7902e38c7..0000000000 --- a/bin/csharp-petstore-net-standard.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClientNetStandard --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} -c ./bin/csharp-petstore-net-standard.json $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/csharp-petstore-netcore-project.sh b/bin/csharp-petstore-netcore-project.sh deleted file mode 100755 index 5ced67903a..0000000000 --- a/bin/csharp-petstore-netcore-project.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClientNetCoreProject --additional-properties packageGuid={67035b31-f8e5-41a4-9673-954035084f7d},netCoreProjectFile=true -c ./bin/csharp-petstore-net-standard.json $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/csharp-petstore.sh b/bin/csharp-petstore.sh deleted file mode 100755 index cbfeb6fab0..0000000000 --- a/bin/csharp-petstore.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} $@" - -java $JAVA_OPTS -jar $executable $ags - -# restore csproj file -echo "restore csproject file: CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj" -cp ./CI/samples.ci/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj ./samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/ - diff --git a/bin/csharp-property-changed-petstore.sh b/bin/csharp-property-changed-petstore.sh deleted file mode 100755 index 6ac09c9406..0000000000 --- a/bin/csharp-property-changed-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged --additional-properties generatePropertyChanged=true --additional-properties optionalEmitDefaultValues=true --additional-properties packageGuid={5CD900DE-8266-412F-A758-28E1F9C623D5} $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/cwiki-petstore.sh b/bin/cwiki-petstore.sh deleted file mode 100755 index 8be6741028..0000000000 --- a/bin/cwiki-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/confluenceWikiDocs -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g cwiki -o samples/documentation/cwiki $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/dart-dio-petstore.sh b/bin/dart-dio-petstore.sh deleted file mode 100755 index 724c0f9b08..0000000000 --- a/bin/dart-dio-petstore.sh +++ /dev/null @@ -1,34 +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" - -# Generate non-browserClient -ags="generate -t modules/openapi-generator/src/main/resources/dart-dio -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart-dio -o samples/client/petstore/dart-dio/ --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/dart-jaguar-petstore.sh b/bin/dart-jaguar-petstore.sh deleted file mode 100755 index c5348cd34b..0000000000 --- a/bin/dart-jaguar-petstore.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" - -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" - -# Generate client -ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/openapi --additional-properties hideGenerationTimestamp=true,pubName=openapi" -java $JAVA_OPTS -jar $executable $ags - -# Generate non-browserClient and put it to the flutter sample app -ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/flutter_petstore/openapi --additional-properties hideGenerationTimestamp=true,pubName=openapi" -java $JAVA_OPTS -jar $executable $ags - -# Generate proto and put it to the flutter sample app -ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/flutter_proto_petstore/openapi --additional-properties serialization=proto,hideGenerationTimestamp=true,pubName=openapi" -java $JAVA_OPTS -jar $executable $ags - -# Generate proto and put it to the sample -ags="$@ generate -t modules/openapi-generator/src/main/resources/dart-jaguar -i modules/openapi-generator/src/test/resources/2_0/petstore-proto.yaml -g dart-jaguar -o samples/client/petstore/dart-jaguar/openapi_proto --additional-properties serialization=proto,hideGenerationTimestamp=true,pubName=openapi" -java $JAVA_OPTS -jar $executable $ags - -# There is a proposal to allow importing different libraries depending on the environment: -# https://github.com/munificent/dep-interface-libraries -# When this is implemented there will only be one library. - -# The current petstore test will then work for both: the browser library and the vm library. diff --git a/bin/dart-petstore.sh b/bin/dart-petstore.sh deleted file mode 100755 index 74b52e234d..0000000000 --- a/bin/dart-petstore.sh +++ /dev/null @@ -1,51 +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" - -# Generate non-browserClient -ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi --additional-properties hideGenerationTimestamp=true,browserClient=false,supportDart2=false $@" - -# then options to generate the library for vm would be: -#ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi_vm --additional-properties browserClient=false,pubName=openapi_vm --additional-properties supportDart2=false $@" -java $JAVA_OPTS -jar $executable $ags - -# Generate browserClient -ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi-browser-client --additional-properties hideGenerationTimestamp=true,browserClient=true,supportDart2=false $@" -java $JAVA_OPTS -jar $executable $ags - -# TODO: Remove this as it duplicate output from the first example in this file. -# Generate non-browserClient and put it to the flutter sample app -ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/openapi --additional-properties hideGenerationTimestamp=true,browserClient=false,supportDart2=false $@" -java $JAVA_OPTS -jar $executable $ags - -# There is a proposal to allow importing different libraries depending on the environment: -# https://github.com/munificent/dep-interface-libraries -# When this is implemented there will only be one library. - -# The current petstore test will then work for both: the browser library and the vm library. diff --git a/bin/dart2-petstore.sh b/bin/dart2-petstore.sh deleted file mode 100755 index e309802ed3..0000000000 --- a/bin/dart2-petstore.sh +++ /dev/null @@ -1,33 +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" - -# Generate client -ags="generate -t modules/openapi-generator/src/main/resources/dart2 -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g dart -o samples/client/petstore/dart2/petstore_client_lib --additional-properties hideGenerationTimestamp=true $@" -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/dynamic-html.sh b/bin/dynamic-html.sh deleted file mode 100755 index 6dfaa10cc4..0000000000 --- a/bin/dynamic-html.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dynamic-html -o samples/documentation/dynamic-html $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/eiffel-petstore.sh b/bin/eiffel-petstore.sh deleted file mode 100755 index 50e73639e9..0000000000 --- a/bin/eiffel-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -args="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g eiffel -o samples/client/petstore/eiffel/ $@" - -java $JAVA_OPTS -jar $executable $args diff --git a/bin/elixir-petstore.sh b/bin/elixir-petstore.sh deleted file mode 100755 index c826ea8519..0000000000 --- a/bin/elixir-petstore.sh +++ /dev/null @@ -1,37 +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 - -# remove existing lib and model file -echo "removing existing lib, model files" -rm -Rf "samples/client/petstore/elixir/lib/openapi_petstore/model/" -rm -Rf "samples/client/petstore/elixir/lib/openapi_petstore/api/" - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -args="generate -t modules/openapi-generator/src/main/resources/elixir -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g elixir -o samples/client/petstore/elixir/ --additional-properties invokerPackage=OpenapiPetstore $@" - -java $JAVA_OPTS -jar $executable $args diff --git a/bin/erlang-petstore-client.sh b/bin/erlang-petstore-client.sh deleted file mode 100755 index 5ff65bf392..0000000000 --- a/bin/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 -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-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 deleted file mode 100755 index 2db7ed0e0e..0000000000 --- a/bin/erlang-petstore-proper.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -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 deleted file mode 100755 index de587f37b9..0000000000 --- a/bin/erlang-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -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/flash-petstore.json b/bin/flash-petstore.json deleted file mode 100644 index 8b52733fcf..0000000000 --- a/bin/flash-petstore.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "packageName": "org.openapitools", - "invokerPackage": "org.openapitools" -} diff --git a/bin/flash-petstore.sh b/bin/flash-petstore.sh deleted file mode 100755 index bee9918776..0000000000 --- a/bin/flash-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/flash -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g flash -o samples/client/petstore/flash -c bin/flash-petstore.json $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/fsharp-functions-server-petstore.sh b/bin/fsharp-functions-server-petstore.sh deleted file mode 100755 index 23cce9c0e7..0000000000 --- a/bin/fsharp-functions-server-petstore.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g fsharp-functions -o samples/server/petstore/fsharp-functions" - -java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/fsharp-giraffe-server-petstore.sh b/bin/fsharp-giraffe-server-petstore.sh deleted file mode 100755 index 659280983f..0000000000 --- a/bin/fsharp-giraffe-server-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -t modules/openapi-generator/src/main/resources/fsharp-giraffe-server -g fsharp-giraffe-server -o samples/server/petstore/fsharp-giraffe $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/generate-samples.sh b/bin/generate-samples.sh new file mode 100755 index 0000000000..5205b22c74 --- /dev/null +++ b/bin/generate-samples.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +# this bash script generates all samples. +# it ensures that all changes are committed into the 'samples/' folder +# shellcheck disable=SC2155 +declare cwd="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +declare root="$(cd "$cwd" && cd ../ && pwd)" +declare executable="${root}/modules/openapi-generator-cli/target/openapi-generator-cli.jar" + +echo "# START SCRIPT: $0" +echo "This script generates all configs under bin/configs by default." +echo "You may generate a targeted script or set of scripts using glob patterns." +echo "For example: $0 bin/configs/java-*" +echo "" +echo "Please press CTRL+C to stop or the script will continue in 5 seconds." + +sleep 5 +if [ ! -f "$executable" ]; then + (cd "${root}" && mvn -B --no-snapshot-updates clean package -DskipTests=true -Dmaven.javadoc.skip=true -Djacoco.skip=true) +fi + +export JAVA_OPTS="${JAVA_OPTS} -server -Duser.timezone=UTC" + +configs=${@:-"${root}"/bin/configs/*.yaml} + +# shellcheck disable=SC2086 +java $JAVA_OPTS -jar "$executable" batch --includes-base-dir "${root}" --fail-fast -- $configs diff --git a/bin/go-experimental-petstore.sh b/bin/go-experimental-petstore.sh deleted file mode 100755 index ea7d839795..0000000000 --- a/bin/go-experimental-petstore.sh +++ /dev/null @@ -1,39 +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 - -SPEC="modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml" -GENERATOR="go-experimental" -STUB_DIR="samples/client/petstore/go-experimental/go-petstore" - -echo "Removing files and folders under $STUB_DIR" -rm -rf $STUB_DIR - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/$GENERATOR -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstore $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/go-gin-petstore-server.sh b/bin/go-gin-petstore-server.sh deleted file mode 100755 index bbd7cda316..0000000000 --- a/bin/go-gin-petstore-server.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -SPEC="modules/openapi-generator/src/test/resources/3_0/petstore.yaml" -GENERATOR="go-gin-server" -STUB_DIR="samples/server/petstore/go-gin-api-server" - -echo "Removing auto-generated files and folders under $STUB_DIR" -rm -rf $STUB_DIR/go - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" - -ags="generate -t modules/openapi-generator/src/main/resources/go-gin-server -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstoreserver --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/go-petstore-server.sh b/bin/go-petstore-server.sh deleted file mode 100755 index d58365c5db..0000000000 --- a/bin/go-petstore-server.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -SPEC="modules/openapi-generator/src/test/resources/3_0/petstore.yaml" -GENERATOR="go-server" -STUB_DIR="samples/server/petstore/go-api-server" - -echo "Removing auto-generated files and folders under $STUB_DIR" -rm -rf $STUB_DIR/go - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" - -ags="generate -t modules/openapi-generator/src/main/resources/go-server -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstoreserver,hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/go-petstore-withxml.sh b/bin/go-petstore-withxml.sh deleted file mode 100755 index 4c57549725..0000000000 --- a/bin/go-petstore-withxml.sh +++ /dev/null @@ -1,39 +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 - -SPEC="modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml" -GENERATOR="go" -STUB_DIR="samples/client/petstore/go/go-petstore-withXml" - -echo "Removing files and folders under $STUB_DIR" -rm -rf $STUB_DIR - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstore,withXml=true,withGoCodegenComment=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/go-petstore.sh b/bin/go-petstore.sh deleted file mode 100755 index 7dc5fe4907..0000000000 --- a/bin/go-petstore.sh +++ /dev/null @@ -1,39 +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 - -SPEC="modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml" -GENERATOR="go" -STUB_DIR="samples/client/petstore/go/go-petstore" - -echo "Removing files and folders under $STUB_DIR" -rm -rf $STUB_DIR - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstore $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/graphql-nodejs-express-server.sh b/bin/graphql-nodejs-express-server.sh deleted file mode 100755 index 69ee4a3bf5..0000000000 --- a/bin/graphql-nodejs-express-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties $@" -ags="generate -t modules/openapi-generator/src/main/resources/graphql-nodejs-express-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g graphql-nodejs-express-server -o samples/server/petstore/graphql-nodejs-express-server --additional-properties packageName=petstore $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/graphql-schema-petstore.sh b/bin/graphql-schema-petstore.sh deleted file mode 100755 index b99d3bba87..0000000000 --- a/bin/graphql-schema-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties $@" -ags="generate -t modules/openapi-generator/src/main/resources/graphql-schema -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g graphql-schema -o samples/config/petstore/graphql-schema --additional-properties packageName=petstore $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/groovy-petstore.sh b/bin/groovy-petstore.sh deleted file mode 100755 index e5e5f688eb..0000000000 --- a/bin/groovy-petstore.sh +++ /dev/null @@ -1,31 +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/Groovy/ -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g groovy -o samples/client/petstore/groovy --additional-properties hideGenerationTimestamp=true $@" -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/haskell-http-client-petstore.sh b/bin/haskell-http-client-petstore.sh deleted file mode 100755 index 4cd7f86083..0000000000 --- a/bin/haskell-http-client-petstore.sh +++ /dev/null @@ -1,34 +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" - -args="generate -t modules/openapi-generator/src/main/resources/haskell-http-client -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g haskell-http-client -o samples/client/petstore/haskell-http-client $@" - -echo "java ${JAVA_OPTS} -jar ${executable} ${args}" -java $JAVA_OPTS -jar $executable $args diff --git a/bin/haskell-servant-petstore.sh b/bin/haskell-servant-petstore.sh deleted file mode 100755 index 61d272a580..0000000000 --- a/bin/haskell-servant-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/haskell-servant -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g haskell -o samples/server/petstore/haskell-servant $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/html-markdown.sh b/bin/html-markdown.sh deleted file mode 100755 index 09d4b92060..0000000000 --- a/bin/html-markdown.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/markdown.yaml -g html -o samples/documentation/html.md $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/html-petstore.sh b/bin/html-petstore.sh deleted file mode 100755 index 1b32f50726..0000000000 --- a/bin/html-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/htmlDocs -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g html -o samples/documentation/html $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/html2-petstore.sh b/bin/html2-petstore.sh deleted file mode 100755 index 6801db85f4..0000000000 --- a/bin/html2-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g html2 -o samples/documentation/html2 -t modules/openapi-generator/src/main/resources/htmlDocs2/ --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-inflector-petstore-server.sh b/bin/java-inflector-petstore-server.sh deleted file mode 100755 index b37e444a92..0000000000 --- a/bin/java-inflector-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaInflector -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java-inflector -o samples/server/petstore/java-inflector --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-jaxrs-petstore-server-all.sh b/bin/java-jaxrs-petstore-server-all.sh deleted file mode 100755 index eb6a7bacbd..0000000000 --- a/bin/java-jaxrs-petstore-server-all.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# script to run all generators extending AbstractJavaJAXRSServerCodegen - -./bin/jaxrs-petstore-server-datelib-j8.sh -./bin/jaxrs-cxf-cdi-petstore-server.sh -./bin/jaxrs-cxf-petstore-server-annotated-base-path.sh -./bin/jaxrs-cxf-petstore-server-non-spring-application.sh -./bin/jaxrs-cxf-petstore-server.sh -./bin/jaxrs-jersey1-petstore-server.sh -./bin/jaxrs-jersey1-usetags-petstore-server.sh -./bin/jaxrs-petstore-server.sh -./bin/jaxrs-resteasy-eap-java8-petstore-server.sh -./bin/jaxrs-resteasy-eap-joda-petstore-server.sh -./bin/jaxrs-resteasy-eap-petstore-server.sh -./bin/jaxrs-resteasy-joda-petstore-server.sh -./bin/jaxrs-resteasy-petstore-server.sh -./bin/jaxrs-spec-petstore-server-interface.sh -./bin/jaxrs-spec-petstore-server.sh -./bin/jaxrs-usetags-petstore-server.sh - -./bin/openapi3/jaxrs-jersey-petstore.sh - -echo " Please run ./bin/jaxrs-cxf-petstore-server-test-data.sh manually instead" diff --git a/bin/java-msf4j-petstore-server.sh b/bin/java-msf4j-petstore-server.sh deleted file mode 100755 index 46ae1caef9..0000000000 --- a/bin/java-msf4j-petstore-server.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/java-msf4j-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java-msf4j -o samples/server/petstore/java-msf4j/ --additional-properties hideGenerationTimestamp=true --additional-properties artifactId=java-msf4j-server $@" - -echo "Removing files and folders under samples/server/petstore/java-msf4j/src/main" -rm -rf samples/server/petstore/java-msf4j/src/main -find samples/server/petstore/java-msf4j -maxdepth 1 -type f ! -name "README.md" ! -name "pom.xml" ! -name "mvn_test_jdk8_only.sh" ! -name ".openapi-generator-ignore" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-all.sh b/bin/java-petstore-all.sh deleted file mode 100755 index 2277e850bb..0000000000 --- a/bin/java-petstore-all.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# update java petstore clients for all supported http libraries - -./bin/java-petstore-feign-10x.sh -./bin/java-petstore-google-api-client.sh -./bin/java-petstore-jersey1.sh -./bin/java-petstore-jersey2-java8.sh -./bin/java-petstore-microprofile.sh -./bin/java-petstore-native.sh -./bin/java-petstore-okhttp-gson-parcelable.sh -./bin/java-petstore-okhttp-gson.sh -./bin/java-petstore-rest-assured.sh -./bin/java-petstore-rest-assured-jackson.sh -./bin/java-petstore-resteasy.sh -./bin/java-petstore-resttemplate-withxml.sh -./bin/java-petstore-resttemplate.sh -./bin/java-petstore-retrofit2-play24.sh -./bin/java-petstore-retrofit2-play25.sh -./bin/java-petstore-retrofit2-play26.sh -./bin/java-petstore-retrofit2.sh -./bin/java-petstore-retrofit2rx.sh -./bin/java-petstore-retrofit2rx2.sh -./bin/java-petstore-vertx.sh -./bin/java-petstore-webclient.sh diff --git a/bin/java-petstore-feign-10x.json b/bin/java-petstore-feign-10x.json deleted file mode 100644 index 95949f4a93..0000000000 --- a/bin/java-petstore-feign-10x.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "library": "feign", - "artifactId": "petstore-feign-10x" -} diff --git a/bin/java-petstore-feign-10x.sh b/bin/java-petstore-feign-10x.sh deleted file mode 100755 index 3a98ad061b..0000000000 --- a/bin/java-petstore-feign-10x.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-feign-10x.json -o samples/client/petstore/java/feign10x --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is $@" - -echo "Removing files and folders under samples/client/petstore/java/feign10x/src/main" -rm -rf samples/client/petstore/java/feign10x/src/main -find samples/client/petstore/java/feign10x -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags - -# copy additional manually written unit-tests -mkdir samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client - -cp CI/samples.ci/client/petstore/java/test-manual/common/StringUtilTest.java samples/client/petstore/java/feign10x/src/test/java/org/openapitools/client/StringUtilTest.java diff --git a/bin/java-petstore-google-api-client.json b/bin/java-petstore-google-api-client.json deleted file mode 100644 index c25698724b..0000000000 --- a/bin/java-petstore-google-api-client.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "library": "google-api-client", - "artifactId": "petstore-google-api-client" -} diff --git a/bin/java-petstore-google-api-client.sh b/bin/java-petstore-google-api-client.sh deleted file mode 100755 index 866e8d4010..0000000000 --- a/bin/java-petstore-google-api-client.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-google-api-client.json -o samples/client/petstore/java/google-api-client --additional-properties hideGenerationTimestamp=true $@" - -echo "Removing files and folders under samples/client/petstore/java/google-api-client/src/main" -rm -rf samples/client/petstore/java/google-api-client/src/main -find samples/client/petstore/java/google-api-client -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-jersey1.sh b/bin/java-petstore-jersey1.sh deleted file mode 100755 index 75a399b476..0000000000 --- a/bin/java-petstore-jersey1.sh +++ /dev/null @@ -1,47 +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 --artifact-id petstore-java-client-jersey1 -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -o samples/client/petstore/java/jersey1 --additional-properties hideGenerationTimestamp=true --library=jersey1 $@" - -echo "Removing files and folders under samples/client/petstore/java/jersey1/src/main" -rm -rf samples/client/petstore/java/jersey1/src/main -find samples/client/petstore/java/jersey1 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags - -# copy additional manually written unit-tests -mkdir samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client -mkdir samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/auth -mkdir samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model - -cp CI/samples.ci/client/petstore/java/test-manual/common/StringUtilTest.java samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/StringUtilTest.java -cp CI/samples.ci/client/petstore/java/test-manual/jersey1/ApiClientTest.java samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/ApiClientTest.java -cp CI/samples.ci/client/petstore/java/test-manual/common/ConfigurationTest.java samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/ConfigurationTest.java -cp CI/samples.ci/client/petstore/java/test-manual/jersey1/auth/ApiKeyAuthTest.java samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java -cp CI/samples.ci/client/petstore/java/test-manual/jersey1/auth/HttpBasicAuthTest.java samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java -cp CI/samples.ci/client/petstore/java/test-manual/jersey1/model/EnumValueTest.java samples/client/petstore/java/jersey1/src/test/java/org/openapitools/client/model/EnumValueTest.java diff --git a/bin/java-petstore-jersey2-java8.json b/bin/java-petstore-jersey2-java8.json deleted file mode 100644 index 2c5ee492f6..0000000000 --- a/bin/java-petstore-jersey2-java8.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "library": "jersey2", - "artifactId": "petstore-jersey2", - "dateLibrary": "java8" -} diff --git a/bin/java-petstore-jersey2-java8.sh b/bin/java-petstore-jersey2-java8.sh deleted file mode 100755 index d964032cf0..0000000000 --- a/bin/java-petstore-jersey2-java8.sh +++ /dev/null @@ -1,48 +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 --artifact-id petstore-jersey2-java8 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-jersey2-java8.json -o samples/client/petstore/java/jersey2-java8 --additional-properties hideGenerationTimestamp=true --additional-properties serverPort=8082 $@" - -echo "Removing files and folders under samples/client/petstore/java/jersey2-java8/src/main" -rm -rf samples/client/petstore/java/jersey2-java8/src/main -find samples/client/petstore/java/jersey2-java8 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags - -# copy additional manually written unit-tests -mkdir -p samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client -mkdir -p samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth -mkdir -p samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model - -cp CI/samples.ci/client/petstore/java/test-manual/common/StringUtilTest.java samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/StringUtilTest.java -cp CI/samples.ci/client/petstore/java/test-manual/jersey2/ApiClientTest.java samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/ApiClientTest.java -cp CI/samples.ci/client/petstore/java/test-manual/common/ConfigurationTest.java samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/ConfigurationTest.java -cp CI/samples.ci/client/petstore/java/test-manual/jersey2/auth/ApiKeyAuthTest.java samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java -cp CI/samples.ci/client/petstore/java/test-manual/jersey2/auth/HttpBasicAuthTest.java samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java -cp CI/samples.ci/client/petstore/java/test-manual/jersey2/model/EnumValueTest.java samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model/EnumValueTest.java -cp CI/samples.ci/client/petstore/java/test-manual/jersey2-java8/JSONTest.java samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/JSONTest.java diff --git a/bin/java-petstore-microprofile.sh b/bin/java-petstore-microprofile.sh deleted file mode 100755 index b7a93f6a98..0000000000 --- a/bin/java-petstore-microprofile.sh +++ /dev/null @@ -1,36 +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} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id "microprofile-rest-client" -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java --library microprofile -o samples/client/petstore/java/microprofile-rest-client $@" - -echo "Removing files and folders under samples/client/petstore/java/microprofile-rest-client/src/main" -rm -rf samples/client/petstore/java/microprofile-rest-client/src/main -find samples/client/petstore/java/microprofile-rest-client -maxdepth 1 -type f ! -name "README.md" -exec rm {} + - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-native-async.sh b/bin/java-petstore-native-async.sh deleted file mode 100755 index 1782614d9e..0000000000 --- a/bin/java-petstore-native-async.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-native.json -o samples/client/petstore/java/native-async --additional-properties hideGenerationTimestamp=true,asyncNative=true $@" - -echo "Removing files and folders under samples/client/petstore/java/httpclient/src/main" -rm -rf samples/client/petstore/java/native-async/src/main -find samples/client/petstore/java/native-async -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-native.json b/bin/java-petstore-native.json deleted file mode 100644 index b5642e5b53..0000000000 --- a/bin/java-petstore-native.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "library": "native", - "artifactId": "petstore-native" -} diff --git a/bin/java-petstore-native.sh b/bin/java-petstore-native.sh deleted file mode 100755 index 063275017e..0000000000 --- a/bin/java-petstore-native.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-native.json -o samples/client/petstore/java/native --additional-properties hideGenerationTimestamp=true $@" - -echo "Removing files and folders under samples/client/petstore/java/httpclient/src/main" -rm -rf samples/client/petstore/java/native/src/main -find samples/client/petstore/java/native -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-okhttp-gson-parcelable.sh b/bin/java-petstore-okhttp-gson-parcelable.sh deleted file mode 100755 index 92087756dd..0000000000 --- a/bin/java-petstore-okhttp-gson-parcelable.sh +++ /dev/null @@ -1,34 +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 --artifact-id petstore-okhttp-gson-parcelableModel -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-okhttp-gson.json -o samples/client/petstore/java/okhttp-gson-parcelableModel --additional-properties hideGenerationTimestamp=true,parcelableModel=true $@" - -rm -rf samples/client/petstore/java/okhttp-gson-parcelableModel/src/main -find samples/client/petstore/java/okhttp-gson-parcelableModel -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-okhttp-gson.json b/bin/java-petstore-okhttp-gson.json deleted file mode 100644 index 8ee5473563..0000000000 --- a/bin/java-petstore-okhttp-gson.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "library": "okhttp-gson", - "artifactId": "petstore-okhttp-gson" -} diff --git a/bin/java-petstore-okhttp-gson.sh b/bin/java-petstore-okhttp-gson.sh deleted file mode 100755 index 8e2e527d2a..0000000000 --- a/bin/java-petstore-okhttp-gson.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-okhttp-gson.json -o samples/client/petstore/java/okhttp-gson --additional-properties hideGenerationTimestamp=true $@" - -rm -rf samples/client/petstore/java/okhttp-gson/src/main -find samples/client/petstore/java/okhttp-gson -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags - -# copy additional manually written unit-tests -mkdir -p samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client -mkdir -p samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth -mkdir -p samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model - -cp CI/samples.ci/client/petstore/java/test-manual/common/StringUtilTest.java samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/StringUtilTest.java -cp CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/ApiClientTest.java samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ApiClientTest.java -cp CI/samples.ci/client/petstore/java/test-manual/common/ConfigurationTest.java samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/ConfigurationTest.java -cp CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/auth/ApiKeyAuthTest.java samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java -cp CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/auth/HttpBasicAuthTest.java samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java -cp CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/model/EnumValueTest.java samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/EnumValueTest.java -cp CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/model/PetTest.java samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/PetTest.java -cp CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/model/ArrayOfArrayOfNumberOnlyTest.java samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java -cp CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/JSONTest.java samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/JSONTest.java -cp CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/api/PetApiTest.java samples/client/petstore/java/okhttp-gson/src/test/java/org/openapitools/client/api/PetApiTest.java diff --git a/bin/java-petstore-rest-assured-jackson.json b/bin/java-petstore-rest-assured-jackson.json deleted file mode 100644 index d6e6035df8..0000000000 --- a/bin/java-petstore-rest-assured-jackson.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "library": "rest-assured", - "artifactId": "petstore-rest-assured-jackson" -} diff --git a/bin/java-petstore-rest-assured-jackson.sh b/bin/java-petstore-rest-assured-jackson.sh deleted file mode 100755 index b5d1888032..0000000000 --- a/bin/java-petstore-rest-assured-jackson.sh +++ /dev/null @@ -1,36 +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" -target_dir="./samples/client/petstore/java/rest-assured-jackson/" - -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" -args="generate -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-rest-assured-jackson.json -o ${target_dir} --additional-properties hideGenerationTimestamp=true --additional-properties useBeanValidation=true --additional-properties performBeanValidation=true --additional-properties booleanGetterPrefix=is --additional-properties java8=true --additional-properties dateLibrary=java8 --additional-properties serializationLibrary=jackson $@" - -echo "Removing ${target_dir}" -rm -rf "${target_dir}" - -java $JAVA_OPTS -jar $executable $args diff --git a/bin/java-petstore-rest-assured.json b/bin/java-petstore-rest-assured.json deleted file mode 100644 index 86e6216a23..0000000000 --- a/bin/java-petstore-rest-assured.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "library": "rest-assured", - "artifactId": "petstore-rest-assured" -} diff --git a/bin/java-petstore-rest-assured.sh b/bin/java-petstore-rest-assured.sh deleted file mode 100755 index 81f1893ed8..0000000000 --- a/bin/java-petstore-rest-assured.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-rest-assured.json -o samples/client/petstore/java/rest-assured --additional-properties hideGenerationTimestamp=true --additional-properties useBeanValidation=true --additional-properties performBeanValidation=true --additional-properties booleanGetterPrefix=is $@" - -echo "Removing files and folders under samples/client/petstore/java/rest-assured/src/main" -rm -rf samples/client/petstore/java/rest-assured/src/main -find samples/client/petstore/java/rest-assured -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags - diff --git a/bin/java-petstore-resteasy-all.sh b/bin/java-petstore-resteasy-all.sh deleted file mode 100755 index c1a346943f..0000000000 --- a/bin/java-petstore-resteasy-all.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -./bin/java-petstore-resteasy.sh -./bin/jaxrs-resteasy-eap-petstore-server.sh -./bin/jaxrs-resteasy-eap-java8-petstore-server.sh -./bin/jaxrs-resteasy-joda-petstore-server.sh -./bin/jaxrs-resteasy-eap-joda-petstore-server.sh -./bin/jaxrs-resteasy-petstore-server.sh* diff --git a/bin/java-petstore-resteasy.json b/bin/java-petstore-resteasy.json deleted file mode 100644 index 6998a56fd7..0000000000 --- a/bin/java-petstore-resteasy.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "library": "resteasy", - "artifactId": "petstore-resteasy" -} diff --git a/bin/java-petstore-resteasy.sh b/bin/java-petstore-resteasy.sh deleted file mode 100755 index ae61137413..0000000000 --- a/bin/java-petstore-resteasy.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-resteasy.json -o samples/client/petstore/java/resteasy --additional-properties hideGenerationTimestamp=true $@" - -echo "Removing files and folders under samples/client/petstore/java/resteasy/src/main" -rm -rf samples/client/petstore/java/resteasy/src/main -find samples/client/petstore/java/resteasy -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-resttemplate-withxml.sh b/bin/java-petstore-resttemplate-withxml.sh deleted file mode 100755 index 19c142a2d4..0000000000 --- a/bin/java-petstore-resttemplate-withxml.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml --artifact-id petstore-resttemplate-withxml -g java -c bin/java-petstore-resttemplate.json -o samples/client/petstore/java/resttemplate-withXml --additional-properties hideGenerationTimestamp=true,withXml=true $@" - -echo "Removing files and folders under samples/client/petstore/java/resttemplate/src/main" -rm -rf samples/client/petstore/java/resttemplate-withXml/src/main -find samples/client/petstore/java/resttemplate-withXml -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-resttemplate.json b/bin/java-petstore-resttemplate.json deleted file mode 100644 index ab1bc1e4dd..0000000000 --- a/bin/java-petstore-resttemplate.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "library": "resttemplate", - "artifactId": "petstore-resttemplate" -} diff --git a/bin/java-petstore-resttemplate.sh b/bin/java-petstore-resttemplate.sh deleted file mode 100755 index d37d40059f..0000000000 --- a/bin/java-petstore-resttemplate.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-resttemplate.json -o samples/client/petstore/java/resttemplate --additional-properties hideGenerationTimestamp=true $@" - -echo "Removing files and folders under samples/client/petstore/java/resttemplate/src/main" -rm -rf samples/client/petstore/java/resttemplate/src/main -find samples/client/petstore/java/resttemplate -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags - -# copy additional manually written unit-tests -mkdir samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client -mkdir samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/auth -mkdir samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model - -cp CI/samples.ci/client/petstore/java/test-manual/resttemplate/ApiClientTest.java samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/ApiClientTest.java -cp CI/samples.ci/client/petstore/java/test-manual/resttemplate/auth/ApiKeyAuthTest.java samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java -cp CI/samples.ci/client/petstore/java/test-manual/resttemplate/auth/HttpBasicAuthTest.java samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java -cp CI/samples.ci/client/petstore/java/test-manual/resttemplate/model/EnumValueTest.java samples/client/petstore/java/resttemplate/src/test/java/org/openapitools/client/model/EnumValueTest.java diff --git a/bin/java-petstore-retrofit2-all.sh b/bin/java-petstore-retrofit2-all.sh deleted file mode 100755 index 656006917a..0000000000 --- a/bin/java-petstore-retrofit2-all.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -./bin/java-petstore-retrofit2-play24.sh -./bin/java-petstore-retrofit2-play25.sh -./bin/java-petstore-retrofit2-play26.sh -./bin/java-petstore-retrofit2.sh -./bin/java-petstore-retrofit2rx.sh -./bin/java-petstore-retrofit2rx2.sh diff --git a/bin/java-petstore-retrofit2-play24.json b/bin/java-petstore-retrofit2-play24.json deleted file mode 100644 index f5398065c2..0000000000 --- a/bin/java-petstore-retrofit2-play24.json +++ /dev/null @@ -1 +0,0 @@ -{"useBeanValidation":"true","enableBuilderSupport":"true","library":"retrofit2","usePlayWS":"true","playVersion":"play24","dateLibrary":"java8"} diff --git a/bin/java-petstore-retrofit2-play24.sh b/bin/java-petstore-retrofit2-play24.sh deleted file mode 100755 index 4b94855865..0000000000 --- a/bin/java-petstore-retrofit2-play24.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id petstore-java-client-retrofit2-play24 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2-play24.json -o samples/client/petstore/java/retrofit2-play24 --additional-properties hideGenerationTimestamp=true $@" - -echo "Removing files and folders under samples/client/petstore/java/retrofit2-play24/src/main" -rm -rf samples/client/petstore/java/retrofit2-play24/src/main -find samples/client/petstore/java/retrofit2-play24 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-retrofit2-play25.json b/bin/java-petstore-retrofit2-play25.json deleted file mode 100644 index 49eda94f83..0000000000 --- a/bin/java-petstore-retrofit2-play25.json +++ /dev/null @@ -1 +0,0 @@ -{"useBeanValidation":"true","enableBuilderSupport":"true","library":"retrofit2","usePlayWS":"true","playVersion":"play25"} diff --git a/bin/java-petstore-retrofit2-play25.sh b/bin/java-petstore-retrofit2-play25.sh deleted file mode 100755 index 1954c2e045..0000000000 --- a/bin/java-petstore-retrofit2-play25.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id petstore-java-client-retrofit2-play25 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2-play25.json -o samples/client/petstore/java/retrofit2-play25 --additional-properties hideGenerationTimestamp=true $@" - -echo "Removing files and folders under samples/client/petstore/java/retrofit2-play25/src/main" -rm -rf samples/client/petstore/java/retrofit2-play25/src/main -find samples/client/petstore/java/retrofit2-play25 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-retrofit2-play26.json b/bin/java-petstore-retrofit2-play26.json deleted file mode 100644 index 0c7456430d..0000000000 --- a/bin/java-petstore-retrofit2-play26.json +++ /dev/null @@ -1 +0,0 @@ -{"useBeanValidation":"true","enableBuilderSupport":"true","library":"retrofit2","usePlayWS":"true","playVersion":"play26"} diff --git a/bin/java-petstore-retrofit2-play26.sh b/bin/java-petstore-retrofit2-play26.sh deleted file mode 100755 index 0c582d09af..0000000000 --- a/bin/java-petstore-retrofit2-play26.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id petstore-java-client-retrofit2-play26 -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2-play26.json -o samples/client/petstore/java/retrofit2-play26 --additional-properties hideGenerationTimestamp=true $@" - -echo "Removing files and folders under samples/client/petstore/java/retrofit2-play26/src/main" -rm -rf samples/client/petstore/java/retrofit2-play26/src/main -find samples/client/petstore/java/retrofit2-play26 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-retrofit2.json b/bin/java-petstore-retrofit2.json deleted file mode 100644 index dd835a7344..0000000000 --- a/bin/java-petstore-retrofit2.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "library": "retrofit2", - "artifactId": "petstore-retrofit2" -} diff --git a/bin/java-petstore-retrofit2.sh b/bin/java-petstore-retrofit2.sh deleted file mode 100755 index 09bd66f454..0000000000 --- a/bin/java-petstore-retrofit2.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2.json -o samples/client/petstore/java/retrofit2 --additional-properties hideGenerationTimestamp=true $@" - -echo "Removing files and folders under samples/client/petstore/java/retrofit2/src/main" -rm -rf samples/client/petstore/java/retrofit2/src/main -find samples/client/petstore/java/retrofit2 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-retrofit2rx.json b/bin/java-petstore-retrofit2rx.json deleted file mode 100644 index 739b1ddd27..0000000000 --- a/bin/java-petstore-retrofit2rx.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "library": "retrofit2", - "artifactId": "petstore-retrofit2-rx" -} diff --git a/bin/java-petstore-retrofit2rx.sh b/bin/java-petstore-retrofit2rx.sh deleted file mode 100755 index c1ddc268e5..0000000000 --- a/bin/java-petstore-retrofit2rx.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2rx.json -o samples/client/petstore/java/retrofit2rx --additional-properties useRxJava=true,hideGenerationTimestamp=true $@" - -echo "Removing files and folders under samples/client/petstore/java/retrofit2rx/src/main" -rm -rf samples/client/petstore/java/retrofit2rx/src/main -find samples/client/petstore/java/retrofit2rx -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-retrofit2rx2.json b/bin/java-petstore-retrofit2rx2.json deleted file mode 100644 index 1f4fb29189..0000000000 --- a/bin/java-petstore-retrofit2rx2.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "library": "retrofit2", - "artifactId": "petstore-retrofit2-rx2" -} diff --git a/bin/java-petstore-retrofit2rx2.sh b/bin/java-petstore-retrofit2rx2.sh deleted file mode 100755 index 9e7d0fe404..0000000000 --- a/bin/java-petstore-retrofit2rx2.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-retrofit2rx2.json -o samples/client/petstore/java/retrofit2rx2 --additional-properties useRxJava2=true,hideGenerationTimestamp=true $@" - -echo "Removing files and folders under samples/client/petstore/java/retrofit2rx2/src/main" -rm -rf samples/client/petstore/java/retrofit2rx2/src/main -find samples/client/petstore/java/retrofit2rx2 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-vertx.json b/bin/java-petstore-vertx.json deleted file mode 100644 index 620481d022..0000000000 --- a/bin/java-petstore-vertx.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "library": "vertx", - "dateLibrary": "java8", - "artifactId": "petstore-vertx" -} diff --git a/bin/java-petstore-vertx.sh b/bin/java-petstore-vertx.sh deleted file mode 100755 index a2536a3dbf..0000000000 --- a/bin/java-petstore-vertx.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Java -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-vertx.json -o samples/client/petstore/java/vertx --additional-properties hideGenerationTimestamp=true $@" - -echo "Removing files and folders under samples/client/petstore/java/vertx/src/main" -rm -rf samples/client/petstore/java/vertx/src/main -find samples/client/petstore/java/vertx -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-petstore-webclient.json b/bin/java-petstore-webclient.json deleted file mode 100644 index 822ddccce5..0000000000 --- a/bin/java-petstore-webclient.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "library": "webclient", - "artifactId": "petstore-webclient" -} diff --git a/bin/java-petstore-webclient.sh b/bin/java-petstore-webclient.sh deleted file mode 100755 index c9402c60c0..0000000000 --- a/bin/java-petstore-webclient.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-webclient.json -o samples/client/petstore/java/webclient --additional-properties hideGenerationTimestamp=true $@" - -echo "Removing files and folders under samples/client/petstore/java/webclient/src/main" -rm -rf samples/client/petstore/java/webclient/src/main -find samples/client/petstore/java/webclient -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-pkmst-petstore-server.sh b/bin/java-pkmst-petstore-server.sh deleted file mode 100755 index 25d1c95319..0000000000 --- a/bin/java-pkmst-petstore-server.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/java-pkmst -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-pkmst -o samples/server/petstore/java-pkmst/ --additional-properties hideGenerationTimestamp=true $@" - -echo "Removing files and folders under samples/server/petstore/java-pkmst/src/main" -rm -rf samples/server/petstore/java-pkmst/src/main -find samples/server/petstore/java-pkmst/ -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-play-framework-petstore-server-all.sh b/bin/java-play-framework-petstore-server-all.sh deleted file mode 100755 index fa4fd9daf9..0000000000 --- a/bin/java-play-framework-petstore-server-all.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -./bin/java-play-framework-petstore-server.sh -./bin/java-play-framework-petstore-server-controller-only.sh -./bin/java-play-framework-petstore-server-no-bean-validation.sh -./bin/java-play-framework-petstore-server-no-exception-handling.sh -./bin/java-play-framework-petstore-server-no-interface.sh -./bin/java-play-framework-petstore-server-no-swagger-ui.sh -./bin/java-play-framework-petstore-server-no-wrap-calls.sh -./bin/java-play-framework-petstore-server-fake-endpoints.sh -./bin/java-play-framework-petstore-server-api-package-override.sh -./bin/java-play-framework-petstore-server-async.sh diff --git a/bin/java-play-framework-petstore-server-api-package-override.sh b/bin/java-play-framework-petstore-server-api-package-override.sh deleted file mode 100755 index cba7507689..0000000000 --- a/bin/java-play-framework-petstore-server-api-package-override.sh +++ /dev/null @@ -1,34 +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/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-api-package-override --additional-properties hideGenerationTimestamp=true,apiPackage=com.puppies.store.apis $@" - -java $JAVA_OPTS -jar $executable $ags - -cp CI/samples.ci/server/petstore/java-play-framework-api-package-override/pom.xml samples/server/petstore/java-play-framework-api-package-override/pom.xml diff --git a/bin/java-play-framework-petstore-server-async.json b/bin/java-play-framework-petstore-server-async.json deleted file mode 100755 index 69161a46d0..0000000000 --- a/bin/java-play-framework-petstore-server-async.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "additionalProperties" : { - "supportAsync" : true - } -} diff --git a/bin/java-play-framework-petstore-server-async.sh b/bin/java-play-framework-petstore-server-async.sh deleted file mode 100755 index c09f9772fa..0000000000 --- a/bin/java-play-framework-petstore-server-async.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -c bin/java-play-framework-petstore-server-async.json -o samples/server/petstore/java-play-framework-async --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-play-framework-petstore-server-controller-only.sh b/bin/java-play-framework-petstore-server-controller-only.sh deleted file mode 100755 index 85a2326122..0000000000 --- a/bin/java-play-framework-petstore-server-controller-only.sh +++ /dev/null @@ -1,34 +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/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-controller-only --additional-properties hideGenerationTimestamp=true,controllerOnly=true $@" - -java $JAVA_OPTS -jar $executable $ags - -cp CI/samples.ci/server/petstore/java-play-framework-controller-only/pom.xml samples/server/petstore/java-play-framework-controller-only/pom.xml diff --git a/bin/java-play-framework-petstore-server-fake-endpoints.sh b/bin/java-play-framework-petstore-server-fake-endpoints.sh deleted file mode 100755 index 0ae0541204..0000000000 --- a/bin/java-play-framework-petstore-server-fake-endpoints.sh +++ /dev/null @@ -1,34 +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/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-fake-endpoints --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags - -cp CI/samples.ci/server/petstore/java-play-framework-fake-endpoints/pom.xml samples/server/petstore/java-play-framework-fake-endpoints/pom.xml diff --git a/bin/java-play-framework-petstore-server-no-bean-validation.sh b/bin/java-play-framework-petstore-server-no-bean-validation.sh deleted file mode 100755 index 92b924b73d..0000000000 --- a/bin/java-play-framework-petstore-server-no-bean-validation.sh +++ /dev/null @@ -1,34 +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/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-bean-validation --additional-properties hideGenerationTimestamp=true,useBeanValidation=false $@" - -java $JAVA_OPTS -jar $executable $ags - -cp CI/samples.ci/server/petstore/java-play-framework-no-bean-validation/pom.xml samples/server/petstore/java-play-framework-no-bean-validation/pom.xml diff --git a/bin/java-play-framework-petstore-server-no-exception-handling.sh b/bin/java-play-framework-petstore-server-no-exception-handling.sh deleted file mode 100755 index b9fe281c4c..0000000000 --- a/bin/java-play-framework-petstore-server-no-exception-handling.sh +++ /dev/null @@ -1,34 +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/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-exception-handling --additional-properties hideGenerationTimestamp=true,handleExceptions=false $@" - -java $JAVA_OPTS -jar $executable $ags - -cp CI/samples.ci/server/petstore/java-play-framework-no-exception-handling/pom.xml samples/server/petstore/java-play-framework-no-exception-handling/pom.xml diff --git a/bin/java-play-framework-petstore-server-no-interface.sh b/bin/java-play-framework-petstore-server-no-interface.sh deleted file mode 100755 index dbc4b8734a..0000000000 --- a/bin/java-play-framework-petstore-server-no-interface.sh +++ /dev/null @@ -1,34 +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/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-interface --additional-properties hideGenerationTimestamp=true,useInterfaces=false $@" - -java $JAVA_OPTS -jar $executable $ags - -cp CI/samples.ci/server/petstore/java-play-framework-no-interface/pom.xml samples/server/petstore/java-play-framework-no-interface/pom.xml diff --git a/bin/java-play-framework-petstore-server-no-swagger-ui.sh b/bin/java-play-framework-petstore-server-no-swagger-ui.sh deleted file mode 100755 index 494a025316..0000000000 --- a/bin/java-play-framework-petstore-server-no-swagger-ui.sh +++ /dev/null @@ -1,34 +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/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-swagger-ui --additional-properties hideGenerationTimestamp=true,useSwaggerUI=false $@" - -java $JAVA_OPTS -jar $executable $ags - -cp CI/samples.ci/server/petstore/java-play-framework-no-swagger-ui/pom.xml samples/server/petstore/java-play-framework-no-swagger-ui/pom.xml diff --git a/bin/java-play-framework-petstore-server-no-wrap-calls.sh b/bin/java-play-framework-petstore-server-no-wrap-calls.sh deleted file mode 100755 index 7de56cc566..0000000000 --- a/bin/java-play-framework-petstore-server-no-wrap-calls.sh +++ /dev/null @@ -1,34 +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/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework-no-wrap-calls --additional-properties hideGenerationTimestamp=true,wrapCalls=false $@" - -java $JAVA_OPTS -jar $executable $ags - -cp CI/samples.ci/server/petstore/java-play-framework-no-wrap-calls/pom.xml samples/server/petstore/java-play-framework-no-wrap-calls/pom.xml diff --git a/bin/java-play-framework-petstore-server.sh b/bin/java-play-framework-petstore-server.sh deleted file mode 100755 index b187c2e47b..0000000000 --- a/bin/java-play-framework-petstore-server.sh +++ /dev/null @@ -1,34 +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/JavaPlayFramework -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-play-framework -o samples/server/petstore/java-play-framework --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags - -cp CI/samples.ci/server/petstore/java-play-framework/pom.xml samples/server/petstore/java-play-framework/pom.xml diff --git a/bin/java-undertow-petstore-server.sh b/bin/java-undertow-petstore-server.sh deleted file mode 100755 index 957d759252..0000000000 --- a/bin/java-undertow-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/java-undertow-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-undertow-server -o samples/server/petstore/java-undertow --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-vertx-async-petstore-server.sh b/bin/java-vertx-async-petstore-server.sh deleted file mode 100755 index 519dd79c2b..0000000000 --- a/bin/java-vertx-async-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-vertx -o samples/server/petstore/java-vertx/async --additional-properties vertxSwaggerRouterVersion=1.4.0,hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-vertx-rx-petstore-server.sh b/bin/java-vertx-rx-petstore-server.sh deleted file mode 100755 index 651f03f777..0000000000 --- a/bin/java-vertx-rx-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g java-vertx --artifact-id java-vertx-rx-server -o samples/server/petstore/java-vertx/rx --additional-properties vertxSwaggerRouterVersion=1.4.0,rxInterface=true --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/java-vertx-web-rx-petstore-server.sh b/bin/java-vertx-web-rx-petstore-server.sh deleted file mode 100755 index 16a9b48ed1..0000000000 --- a/bin/java-vertx-web-rx-petstore-server.sh +++ /dev/null @@ -1,37 +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 - -SPEC="modules/openapi-generator/src/test/resources/3_0/petstore.yaml" -GENERATOR="java-vertx-web" -TEMPLATE="modules/openapi-generator/src/main/resources/JavaVertXWebServer" -STUB_DIR="samples/server/petstore/java-vertx-web/rx" - -# 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 $SPEC -t $TEMPLATE -g $GENERATOR --artifact-id java-vertx-web-rx-server -o $STUB_DIR --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/javascript-apollo-petstore.sh b/bin/javascript-apollo-petstore.sh deleted file mode 100755 index 13a20dea57..0000000000 --- a/bin/javascript-apollo-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Javascript-Apollo -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g javascript-apollo -o samples/client/petstore/javascript-apollo --additional-properties appName=PetstoreClient $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/javascript-closure-angular.sh b/bin/javascript-closure-angular.sh deleted file mode 100755 index b3cac1c21d..0000000000 --- a/bin/javascript-closure-angular.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g javascript-closure-angular -o samples/client/petstore/javascript-closure-angular $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/javascript-es6-petstore.sh b/bin/javascript-es6-petstore.sh deleted file mode 100755 index 518d3382b9..0000000000 --- a/bin/javascript-es6-petstore.sh +++ /dev/null @@ -1,34 +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/Javascript/es6 \ --i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g javascript \ --o samples/client/petstore/javascript-es6 --additional-properties appName=PetstoreClient $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/javascript-flowtyped-petstore.sh b/bin/javascript-flowtyped-petstore.sh deleted file mode 100755 index 061837a638..0000000000 --- a/bin/javascript-flowtyped-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Javascript-Flowtyped -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g javascript-flowtyped -o samples/client/petstore/javascript-flowtyped --additional-properties appName=PetstoreClient $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/javascript-petstore-all.sh b/bin/javascript-petstore-all.sh deleted file mode 100755 index 1a3a72af7e..0000000000 --- a/bin/javascript-petstore-all.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -./bin/javascript-es6-petstore.sh -./bin/javascript-promise-es6-petstore.sh diff --git a/bin/javascript-promise-es6-petstore.sh b/bin/javascript-promise-es6-petstore.sh deleted file mode 100755 index 42a866b1d6..0000000000 --- a/bin/javascript-promise-es6-petstore.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/Javascript/es6 \ --i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g javascript \ --o samples/client/petstore/javascript-promise-es6 \ ---additional-properties appName=PetstoreClient,usePromises=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-cxf-cdi-petstore-server.sh b/bin/jaxrs-cxf-cdi-petstore-server.sh deleted file mode 100755 index 3d1e538c39..0000000000 --- a/bin/jaxrs-cxf-cdi-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-cdi -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-cxf-cdi -o samples/server/petstore/jaxrs-cxf-cdi --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-cxf-client-petstore.sh b/bin/jaxrs-cxf-client-petstore.sh deleted file mode 100755 index 97346c6112..0000000000 --- a/bin/jaxrs-cxf-client-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id "jaxrs-cxf-petstore-client" -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/ -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-cxf-client -o samples/client/petstore/jaxrs-cxf-client $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-cxf-petstore-server-annotated-base-path.sh b/bin/jaxrs-cxf-petstore-server-annotated-base-path.sh deleted file mode 100755 index 3c8b96a2e6..0000000000 --- a/bin/jaxrs-cxf-petstore-server-annotated-base-path.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id cxf-annotated-basepath -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-cxf -o samples/server/petstore/jaxrs-cxf-annotated-base-path --additional-properties hideGenerationTimestamp=true,useAnnotatedBasePath=true --additional-properties serverPort=8082 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-cxf-petstore-server-non-spring-application.sh b/bin/jaxrs-cxf-petstore-server-non-spring-application.sh deleted file mode 100755 index 6db712b74b..0000000000 --- a/bin/jaxrs-cxf-petstore-server-non-spring-application.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id cxf-server-non-spring -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-cxf -o samples/server/petstore/jaxrs-cxf-non-spring-app --additional-properties hideGenerationTimestamp=true,generateNonSpringApplication=true --additional-properties serverPort=8082 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-cxf-petstore-server-test-data.sh b/bin/jaxrs-cxf-petstore-server-test-data.sh deleted file mode 100755 index 6844b7bcf8..0000000000 --- a/bin/jaxrs-cxf-petstore-server-test-data.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id cxf-test-data -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf-ext -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf-extended -o samples/server/petstore/jaxrs-cxf-test-data --additional-properties hideGenerationTimestamp=true,useAnnotatedBasePath=true --generate-alias-as-model --additional-properties java8=true,generateSpringApplication=true,generateSpringBootApplication=true,generateOperationBody=true,loadTestDataFromFile=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-cxf-petstore-server.sh b/bin/jaxrs-cxf-petstore-server.sh deleted file mode 100755 index 4081b01e86..0000000000 --- a/bin/jaxrs-cxf-petstore-server.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -echo "Removing files and folders under samples/server/petstore/jaxrs-cxf" -rm -rf samples/server/petstore/jaxrs-cxf - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf -o samples/server/petstore/jaxrs-cxf --additional-properties hideGenerationTimestamp=true --additional-properties serverPort=8082 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-datelib-j8.json b/bin/jaxrs-datelib-j8.json deleted file mode 100644 index 7752cec1ee..0000000000 --- a/bin/jaxrs-datelib-j8.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "serializableModel": true, - "withXml": true, - "dateLibrary": "java8", - "java8": true, - "useBeanValidation": true -} diff --git a/bin/jaxrs-jersey1-petstore-server.sh b/bin/jaxrs-jersey1-petstore-server.sh deleted file mode 100755 index 3cc7cc8761..0000000000 --- a/bin/jaxrs-jersey1-petstore-server.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey1 --additional-properties hideGenerationTimestamp=true,serverPort=8082 --library=jersey1 --artifact-id=jaxrs-jersey1-server $@" - -echo "Removing files and folders under samples/server/petstore/jaxrs/jersey1/src/main" -rm -rf samples/server/petstore/jaxrs/jersey1/src/main -find samples/server/petstore/jaxrs/jersey1 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-jersey1-usetags-petstore-server.sh b/bin/jaxrs-jersey1-usetags-petstore-server.sh deleted file mode 100755 index 00746c68db..0000000000 --- a/bin/jaxrs-jersey1-usetags-petstore-server.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey1-useTags --additional-properties hideGenerationTimestamp=true,serverPort=8082 --library=jersey1 --artifact-id=jaxrs-jersey1-useTags --additional-properties useTags=true $@" - -echo "Removing files and folders under samples/server/petstore/jaxrs/jersey1-useTags/src/main" -rm -rf samples/server/petstore/jaxrs/jersey1-useTags/src/main -find samples/server/petstore/jaxrs/jersey1-useTags -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-petstore-server-datelib-j8.sh b/bin/jaxrs-petstore-server-datelib-j8.sh deleted file mode 100755 index 64e9caff3b..0000000000 --- a/bin/jaxrs-petstore-server-datelib-j8.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/ -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs-datelib-j8/ -c ./bin/jaxrs-datelib-j8.json --additional-properties hideGenerationTimestamp=true --additional-properties serverPort=8082 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-petstore-server.sh b/bin/jaxrs-petstore-server.sh deleted file mode 100755 index a75e5d3e55..0000000000 --- a/bin/jaxrs-petstore-server.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id jaxrs-jersey-petstore-server -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey2 --additional-properties hideGenerationTimestamp=true,serverPort=8082 $@" - -echo "Removing files and folders under samples/server/petstore/jaxrs/jersey2/src/main" -rm -rf samples/server/petstore/jaxrs/jersey2/src/main -find samples/server/petstore/jaxrs/jersey2 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-resteasy-eap-java8-petstore-server.json b/bin/jaxrs-resteasy-eap-java8-petstore-server.json deleted file mode 100644 index 3d80aca58c..0000000000 --- a/bin/jaxrs-resteasy-eap-java8-petstore-server.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "dateLibrary": "java8" -} diff --git a/bin/jaxrs-resteasy-eap-java8-petstore-server.sh b/bin/jaxrs-resteasy-eap-java8-petstore-server.sh deleted file mode 100755 index 8b85c90372..0000000000 --- a/bin/jaxrs-resteasy-eap-java8-petstore-server.sh +++ /dev/null @@ -1,36 +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 --artifact-id jaxrs-resteasy-eap-java8-server -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy-eap -o samples/server/petstore/jaxrs-resteasy/eap-java8 --additional-properties hideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-eap-java8-petstore-server.json $@" - -echo "Removing files and folders under samples/server/petstore/jaxrs-resteasy/eap-java8/src/main" -rm -rf samples/server/petstore/jaxrs-resteasy/eap-java8/src/main -find samples/server/petstore/jaxrs-resteasy/eap-java8 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-resteasy-eap-joda-petstore-server.json b/bin/jaxrs-resteasy-eap-joda-petstore-server.json deleted file mode 100644 index 785c7acdc6..0000000000 --- a/bin/jaxrs-resteasy-eap-joda-petstore-server.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "dateLibrary": "joda" -} diff --git a/bin/jaxrs-resteasy-eap-joda-petstore-server.sh b/bin/jaxrs-resteasy-eap-joda-petstore-server.sh deleted file mode 100755 index af9885025d..0000000000 --- a/bin/jaxrs-resteasy-eap-joda-petstore-server.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" - -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 --artifact-id jaxrs-resteasy-eap-joda-server -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy/eap -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy-eap -o samples/server/petstore/jaxrs-resteasy/eap-joda --additional-properties hideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-eap-joda-petstore-server.json $@" - -echo "Removing files and folders under samples/server/petstore/jaxrs-resteasy/eap-joda/src/main" -rm -rf samples/server/petstore/jaxrs-resteasy/eap-joda/src/main -find samples/server/petstore/jaxrs-resteasy/eap-joda -maxdepth 1 -type f ! -name "README.md" -exec rm {} + - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-resteasy-eap-petstore-server.sh b/bin/jaxrs-resteasy-eap-petstore-server.sh deleted file mode 100755 index 7cc23202f4..0000000000 --- a/bin/jaxrs-resteasy-eap-petstore-server.sh +++ /dev/null @@ -1,36 +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/JavaJaxRS/resteasy/eap -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy-eap -o samples/server/petstore/jaxrs-resteasy/eap --additional-properties hideGenerationTimestamp=true $@" - -echo "Removing files and folders under samples/server/petstore/jaxrs-resteasy/eap/src/main" -rm -rf samples/server/petstore/jaxrs-resteasy/eap/src/main -find samples/server/petstore/jaxrs-resteasy/eap -maxdepth 1 -type f ! -name "README.md" -exec rm {} + - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-resteasy-joda-petstore-server.json b/bin/jaxrs-resteasy-joda-petstore-server.json deleted file mode 100644 index 785c7acdc6..0000000000 --- a/bin/jaxrs-resteasy-joda-petstore-server.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "dateLibrary": "joda" -} diff --git a/bin/jaxrs-resteasy-joda-petstore-server.sh b/bin/jaxrs-resteasy-joda-petstore-server.sh deleted file mode 100755 index 66bb1c3fff..0000000000 --- a/bin/jaxrs-resteasy-joda-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id jaxrs-resteasy-joda-server -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/joda --additional-properties hideGenerationTimestamp=true -c ./bin/jaxrs-resteasy-joda-petstore-server.json $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-resteasy-petstore-server.sh b/bin/jaxrs-resteasy-petstore-server.sh deleted file mode 100755 index 6b40673aeb..0000000000 --- a/bin/jaxrs-resteasy-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS/resteasy -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jaxrs-resteasy -o samples/server/petstore/jaxrs-resteasy/default --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-spec-petstore-server-interface-returning-response.sh b/bin/jaxrs-spec-petstore-server-interface-returning-response.sh deleted file mode 100755 index c4cc314bb4..0000000000 --- a/bin/jaxrs-spec-petstore-server-interface-returning-response.sh +++ /dev/null @@ -1,36 +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 --artifact-id jaxrs-spec-interface-response-petstore-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-spec -o samples/server/petstore/jaxrs-spec-interface-response ---additional-properties hideGenerationTimestamp=true ---additional-properties serializableModel=true ---additional-properties interfaceOnly=true ---additional-properties returnResponse=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-spec-petstore-server-interface.sh b/bin/jaxrs-spec-petstore-server-interface.sh deleted file mode 100755 index 570443e26e..0000000000 --- a/bin/jaxrs-spec-petstore-server-interface.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id jaxrs-spec-interface-petstore-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-spec -o samples/server/petstore/jaxrs-spec-interface ---additional-properties hideGenerationTimestamp=true ---additional-properties serializableModel=true ---additional-properties interfaceOnly=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-spec-petstore-server.sh b/bin/jaxrs-spec-petstore-server.sh deleted file mode 100755 index 9d0c75513b..0000000000 --- a/bin/jaxrs-spec-petstore-server.sh +++ /dev/null @@ -1,34 +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 --artifact-id jaxrs-spec-petstore-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-spec -o samples/server/petstore/jaxrs-spec ---additional-properties hideGenerationTimestamp=true ---additional-properties serializableModel=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jaxrs-usetags-petstore-server.sh b/bin/jaxrs-usetags-petstore-server.sh deleted file mode 100755 index 1c84b29a03..0000000000 --- a/bin/jaxrs-usetags-petstore-server.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaJaxRS -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs/jersey2-useTags --additional-properties hideGenerationTimestamp=true,serverPort=8082 --artifact-id=jaxrs-jersey2-useTags --additional-properties useTags=true $@" - -echo "Removing files and folders under samples/server/petstore/jaxrs/jersey2-useTags/src/main" -rm -rf samples/server/petstore/jaxrs/jersey2-useTags/src/main -find samples/server/petstore/jaxrs/jersey2-useTags -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/jmeter-petstore.sh b/bin/jmeter-petstore.sh deleted file mode 100755 index 68260d1cba..0000000000 --- a/bin/jmeter-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g jmeter -o samples/client/petstore/jmeter/ $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/k6-petstore.sh b/bin/k6-petstore.sh deleted file mode 100755 index edb724827e..0000000000 --- a/bin/k6-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -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 -g k6 -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -o samples/client/petstore/k6 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/kotlin-client-all.sh b/bin/kotlin-client-all.sh deleted file mode 100755 index 91348c423e..0000000000 --- a/bin/kotlin-client-all.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -./bin/kotlin-client-gson.sh -./bin/kotlin-client-jackson.sh -./bin/kotlin-client-moshi-codegen.sh -./bin/kotlin-client-nonpublic.sh -./bin/kotlin-client-okhttp3.sh -./bin/kotlin-client-petstore-multiplatform.sh -./bin/kotlin-client-petstore.sh -./bin/kotlin-client-string.sh -./bin/kotlin-client-threetenbp.sh -./bin/kotlin-client-nullable.sh -./bin/kotlin-client-retrofit2.sh -./bin/kotlin-client-json-request-string.sh -./bin/kotlin-client-petstore-okhttp-coroutines.sh diff --git a/bin/kotlin-client-gson.sh b/bin/kotlin-client-gson.sh deleted file mode 100755 index f178cb8803..0000000000 --- a/bin/kotlin-client-gson.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-gson --additional-properties serializationLibrary=gson -o samples/client/petstore/kotlin-gson $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/kotlin-client-jackson.sh b/bin/kotlin-client-jackson.sh deleted file mode 100755 index 516ffc6931..0000000000 --- a/bin/kotlin-client-jackson.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-jackson --additional-properties serializationLibrary=jackson --additional-properties enumPropertyNaming=UPPERCASE -o samples/client/petstore/kotlin-jackson $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/kotlin-client-json-request-string.sh b/bin/kotlin-client-json-request-string.sh deleted file mode 100755 index 2e32eed675..0000000000 --- a/bin/kotlin-client-json-request-string.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore-with-date-field.yaml -g kotlin --artifact-id kotlin-petstore-json-request-string --additional-properties requestDateConverter=toString -o samples/client/petstore/kotlin-json-request-string $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/kotlin-client-moshi-codegen.sh b/bin/kotlin-client-moshi-codegen.sh deleted file mode 100755 index c037b2efd8..0000000000 --- a/bin/kotlin-client-moshi-codegen.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-moshi-codegen --additional-properties serializationLibrary=moshi,moshiCodeGen=true -o samples/client/petstore/kotlin-moshi-codegen $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/kotlin-client-nonpublic.sh b/bin/kotlin-client-nonpublic.sh deleted file mode 100755 index 16c366ef67..0000000000 --- a/bin/kotlin-client-nonpublic.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-nonpublic --additional-properties nonPublicApi=true -o samples/client/petstore/kotlin-nonpublic $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/kotlin-client-nullable.sh b/bin/kotlin-client-nullable.sh deleted file mode 100755 index aaa3ae06f4..0000000000 --- a/bin/kotlin-client-nullable.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-nullable --additional-properties nullableReturnType=true,serializableModel=true -o samples/client/petstore/kotlin-nullable $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/kotlin-client-okhttp3.sh b/bin/kotlin-client-okhttp3.sh deleted file mode 100755 index 3f1cc10170..0000000000 --- a/bin/kotlin-client-okhttp3.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-okhttp3 --library jvm-okhttp3 -o samples/client/petstore/kotlin-okhttp3 $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/kotlin-client-petstore-multiplatform.sh b/bin/kotlin-client-petstore-multiplatform.sh deleted file mode 100755 index a0b5de50b5..0000000000 --- a/bin/kotlin-client-petstore-multiplatform.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-client-petstore-multiplatform --library multiplatform -o samples/client/petstore/kotlin-multiplatform $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/kotlin-client-petstore-okhttp-coroutines.sh b/bin/kotlin-client-petstore-okhttp-coroutines.sh deleted file mode 100755 index 6d7325821e..0000000000 --- a/bin/kotlin-client-petstore-okhttp-coroutines.sh +++ /dev/null @@ -1,37 +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 - -samplePath="samples/client/petstore/kotlin-jvm-okhttp4-coroutines" - -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-client -g kotlin --artifact-id kotlin-petstore-okhttp4-coroutines-client --library jvm-okhttp4 --additional-properties serializationLibrary=gson,dateLibrary=java8,serializableModel=true,useCoroutines=true -o $samplePath $@" - -echo "Cleaning previously generated files if any from $samplePath" -rm -rf $samplePath - -echo "Generating Kotling client..." -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/kotlin-client-petstore.sh b/bin/kotlin-client-petstore.sh deleted file mode 100755 index 409911eb11..0000000000 --- a/bin/kotlin-client-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-client --additional-properties dateLibrary=java8,serializableModel=true -o samples/client/petstore/kotlin $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/kotlin-client-retrofit2.sh b/bin/kotlin-client-retrofit2.sh deleted file mode 100755 index 07bf41fa3e..0000000000 --- a/bin/kotlin-client-retrofit2.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-retrofit2 --library jvm-retrofit2 -o samples/client/petstore/kotlin-retrofit2 $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} \ No newline at end of file diff --git a/bin/kotlin-client-string.sh b/bin/kotlin-client-string.sh deleted file mode 100755 index b544013754..0000000000 --- a/bin/kotlin-client-string.sh +++ /dev/null @@ -1,34 +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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-string --additional-properties dateLibrary=string,serializableModel=true,sortParamsByRequiredFlag=false,sortModelPropertiesByRequiredFlag=false -o samples/client/petstore/kotlin-string $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} - -cp CI/samples.ci/client/petstore/kotlin-string/pom.xml samples/client/petstore/kotlin-string/pom.xml diff --git a/bin/kotlin-client-threetenbp.sh b/bin/kotlin-client-threetenbp.sh deleted file mode 100755 index 0cb7f27da0..0000000000 --- a/bin/kotlin-client-threetenbp.sh +++ /dev/null @@ -1,34 +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/kotlin-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin --artifact-id kotlin-petstore-threetenbp --additional-properties dateLibrary=threetenbp -o samples/client/petstore/kotlin-threetenbp $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} - -cp CI/samples.ci/client/petstore/kotlin-threetenbp/pom.xml samples/client/petstore/kotlin-threetenbp/pom.xml diff --git a/bin/kotlin-client-uppercase-enum.sh b/bin/kotlin-client-uppercase-enum.sh deleted file mode 100755 index 7f456fc3a0..0000000000 --- a/bin/kotlin-client-uppercase-enum.sh +++ /dev/null @@ -1,34 +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/kotlin-client -i modules/openapi-generator/src/test/resources/3_0/issue-4062.yaml -g kotlin --artifact-id kotlin-uppercase-enum --additional-properties enumPropertyNaming=UPPERCASE -o samples/client/petstore/kotlin-uppercase-enum $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} - -#cp CI/samples.ci/client/petstore/kotlin-uppercase-enum/pom.xml samples/client/petstore/kotlin-uppercase-enum/pom.xml diff --git a/bin/kotlin-server-petstore.sh b/bin/kotlin-server-petstore.sh deleted file mode 100755 index 755a560a1f..0000000000 --- a/bin/kotlin-server-petstore.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-server -g kotlin-server --library=ktor -o samples/server/petstore/kotlin-server/ktor --additional-properties hideGenerationTimestamp=true,serializableModel=true $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} - -cp CI/samples.ci/server/petstore/kotlin-server/ktor/pom.xml samples/server/petstore/kotlin-server/ktor/pom.xml diff --git a/bin/kotlin-springboot-petstore-all.sh b/bin/kotlin-springboot-petstore-all.sh deleted file mode 100755 index b24ada1572..0000000000 --- a/bin/kotlin-springboot-petstore-all.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -./bin/kotlin-springboot-petstore-server.sh -./bin/kotlin-springboot-petstore-server-reactive.sh -./bin/kotlin-springboot-petstore-server-model-mutable.sh diff --git a/bin/kotlin-springboot-petstore-server-model-mutable.sh b/bin/kotlin-springboot-petstore-server-model-mutable.sh deleted file mode 100755 index ed3712db26..0000000000 --- a/bin/kotlin-springboot-petstore-server-model-mutable.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-spring -g kotlin-spring -o samples/server/petstore/kotlin-springboot-modelMutable --additional-properties=library=spring-boot,beanValidations=true,swaggerAnnotations=true,serviceImplementation=true,serializableModel=true,modelMutable=true" - -echo "Cleaning previously generated files if any from samples/server/petstore/kotlin-springboot" -rm -rf samples/server/petstore/kotlin-springboot-modelMutable - -echo "Generating Kotling Spring Boot server..." -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/kotlin-springboot-petstore-server-reactive.sh b/bin/kotlin-springboot-petstore-server-reactive.sh deleted file mode 100755 index f5e72350b6..0000000000 --- a/bin/kotlin-springboot-petstore-server-reactive.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-spring -g kotlin-spring -o samples/server/petstore/kotlin-springboot-reactive --additional-properties=library=spring-boot,beanValidations=true,swaggerAnnotations=true,serviceImplementation=true,reactive=true" - -echo "Cleaning previously generated files if any from samples/server/petstore/kotlin-springboot-reactive" -rm -rf samples/server/petstore/kotlin-springboot-reactive - -echo "Generating Kotling Spring Boot reactive server..." -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/kotlin-springboot-petstore-server.sh b/bin/kotlin-springboot-petstore-server.sh deleted file mode 100755 index 73b56bcf8f..0000000000 --- a/bin/kotlin-springboot-petstore-server.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="$@ generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-spring -g kotlin-spring -o samples/server/petstore/kotlin-springboot --additional-properties=library=spring-boot,beanValidations=true,swaggerAnnotations=true,serviceImplementation=true,serializableModel=true" - -echo "Cleaning previously generated files if any from samples/server/petstore/kotlin-springboot" -rm -rf samples/server/petstore/kotlin-springboot - -echo "Generating Kotling Spring Boot server..." -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/kotlin-vertx-server-petstore.sh b/bin/kotlin-vertx-server-petstore.sh deleted file mode 100755 index 7cfc82179c..0000000000 --- a/bin/kotlin-vertx-server-petstore.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" - -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 -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g kotlin-vertx -o samples/server/petstore/kotlin/vertx --additional-properties=modelMutable=false" - -java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/lua-petstore.sh b/bin/lua-petstore.sh deleted file mode 100755 index 77e9589e85..0000000000 --- a/bin/lua-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties $@" -ags="generate -t modules/openapi-generator/src/main/resources/lua -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g lua -o samples/client/petstore/lua --additional-properties packageName=petstore $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/markdown-documentation-petstore.sh b/bin/markdown-documentation-petstore.sh deleted file mode 100755 index ce4c65035c..0000000000 --- a/bin/markdown-documentation-petstore.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" - -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/markdown-documentation -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g markdown -o samples/documentation/markdown $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/meta-codegen-kotlin.sh b/bin/meta-codegen-kotlin.sh index 347d8f7614..905334f5f9 100755 --- a/bin/meta-codegen-kotlin.sh +++ b/bin/meta-codegen-kotlin.sh @@ -26,15 +26,15 @@ ags="meta -n myClientCodegen -t DOCUMENTATION -p com.my.company.codegen -o sampl java $JAVA_OPTS -jar $executable $ags if [ ! -f "${root}"samples/meta-codegen-kotlin/gradle/wrapper/gradle-wrapper.jar ]; then - (cd "${root}"/samples/meta-codegen-kotlin/ && gradle wrapper --gradle-version 5.6.2 --distribution-type bin) + (cd "${root}"/samples/meta-codegen-kotlin/ && gradle --no-daemon wrapper --gradle-version 5.6.2 --distribution-type bin) fi (cp "${root}"/samples/meta-codegen-kotlin/gradlew "${root}"/samples/meta-codegen-kotlin/lib/ && \ cp -R "${root}"/samples/meta-codegen-kotlin/gradle "${root}"/samples/meta-codegen-kotlin/lib/ && \ cd "${root}"/samples/meta-codegen-kotlin/lib && \ - ./gradlew shadowJar) + ./gradlew --no-daemon shadowJar) ags2="generate -g myClientCodegen -i modules/openapi-generator/src/test/resources/2_0/petstore.json -o samples/meta-codegen-kotlin/usage $@" -java $JAVA_OPTS -cp ${root}/samples/meta-codegen-kotlin/lib/build/libs/my-client-codegen-openapi-generator-1.0-SNAPSHOT-all.jar:$executable org.openapitools.codegen.OpenAPIGenerator $ags2 +java $JAVA_OPTS -cp ${root}/samples/meta-codegen-kotlin/lib/build/libs/my-client-codegen-openapi-generator-1.0-SNAPSHOT-all.jar:$executable org.openapitools.codegen.OpenAPIGenerator $ags2 \ No newline at end of file diff --git a/bin/meta-codegen.sh b/bin/meta-codegen.sh index f45875ea3a..d2a05a0fe6 100755 --- a/bin/meta-codegen.sh +++ b/bin/meta-codegen.sh @@ -9,6 +9,7 @@ declare root="$(cd "$cwd" && cd ../ && pwd)" executable="${root}/modules/openapi-generator-cli/target/openapi-generator-cli.jar" if [ ! -f "$executable" ]; then + echo "Rebuilding…" (cd "$root" && ./mvnw -B clean package) fi @@ -17,8 +18,8 @@ ags="meta -n myClientCodegen -t DOCUMENTATION -p com.my.company.codegen -o sampl java $JAVA_OPTS -jar $executable $ags -(cd "$root" && ./mvnw clean package -f samples/meta-codegen/pom.xml) +(cd "$root"/samples/meta-codegen/ && mvn -B package -Djacoco.skip=true -DskipTests=true -f pom.xml) ags2="generate -g myClientCodegen -i modules/openapi-generator/src/test/resources/2_0/petstore.json -o samples/meta-codegen/usage $@" -java $JAVA_OPTS -cp ${root}/samples/meta-codegen/lib/target/myClientCodegen-openapi-generator-1.0.0.jar:$executable org.openapitools.codegen.OpenAPIGenerator $ags2 +java $JAVA_OPTS -cp ${root}/samples/meta-codegen/lib/target/myClientCodegen-openapi-generator-1.0.0.jar:$executable org.openapitools.codegen.OpenAPIGenerator $ags2 \ No newline at end of file diff --git a/bin/mysql-schema-petstore.sh b/bin/mysql-schema-petstore.sh deleted file mode 100755 index ed35c12a07..0000000000 --- a/bin/mysql-schema-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/mysql-schema -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g mysql-schema -o samples/schema/petstore/mysql $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/nancyfx-petstore-server-async.sh b/bin/nancyfx-petstore-server-async.sh deleted file mode 100755 index e39ed8f08c..0000000000 --- a/bin/nancyfx-petstore-server-async.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/csharp-nancyfx -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g csharp-nancyfx -o samples/server/petstore/nancyfx-async --additional-properties packageGuid={768B8DC6-54EE-4D40-9B20-7857E1D742A4},asyncServer=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/nancyfx-petstore-server.sh b/bin/nancyfx-petstore-server.sh deleted file mode 100755 index 1556ada3c2..0000000000 --- a/bin/nancyfx-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/csharp-nancyfx -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g csharp-nancyfx -o samples/server/petstore/nancyfx --additional-properties packageGuid={768B8DC6-54EE-4D40-9B20-7857E1D742A4},asyncServer=false $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/nim-client-petstore.sh b/bin/nim-client-petstore.sh deleted file mode 100755 index 43eb2f3e3a..0000000000 --- a/bin/nim-client-petstore.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" - -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/nim-client -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml --additional-properties packageName=petstore -g nim -o samples/client/petstore/nim" - -java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/nodejs-express-petstore-server.sh b/bin/nodejs-express-petstore-server.sh deleted file mode 100755 index 436cedfd41..0000000000 --- a/bin/nodejs-express-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/nodejs-express-server -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g nodejs-express-server -o samples/server/petstore/nodejs-express-server $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/objc-petstore-all.sh b/bin/objc-petstore-all.sh deleted file mode 100755 index ba79aee09d..0000000000 --- a/bin/objc-petstore-all.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -# default setting -./bin/objc-petstore.sh - -# coredata support -./bin/objc-petstore-coredata.sh - diff --git a/bin/objc-petstore-coredata.sh b/bin/objc-petstore-coredata.sh deleted file mode 100755 index ffa6d19882..0000000000 --- a/bin/objc-petstore-coredata.sh +++ /dev/null @@ -1,33 +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 GENERATOR_GLOBALS="-DapiDocs=false -DmodelDocs=false" -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties ${GENERATOR_GLOBALS}" -ags="generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/2_0/petstore.json -g objc -o samples/client/petstore/objc/core-data --additional-properties coreData=true -c bin/objc-petstore.json $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/objc-petstore.json b/bin/objc-petstore.json deleted file mode 100644 index 9cbfa58d39..0000000000 --- a/bin/objc-petstore.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "classPrefix": "SWG", - "podName": "SwaggerClient" -} diff --git a/bin/objc-petstore.sh b/bin/objc-petstore.sh deleted file mode 100755 index 2ceee96867..0000000000 --- a/bin/objc-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/2_0/petstore.json -g objc -o samples/client/petstore/objc/default -c ./bin/objc-petstore.json $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/ocaml-petstore.sh b/bin/ocaml-petstore.sh deleted file mode 100755 index 1018d3c005..0000000000 --- a/bin/ocaml-petstore.sh +++ /dev/null @@ -1,34 +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" - -args="generate -t modules/openapi-generator/src/main/resources/ocaml -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g ocaml -o samples/client/petstore/ocaml --additional-properties packageName=petstore_client $@" - -echo "java ${JAVA_OPTS} -jar ${executable} ${args}" -java $JAVA_OPTS -jar $executable $args diff --git a/bin/openapi3/android-petstore-all.sh b/bin/openapi3/android-petstore-all.sh deleted file mode 100755 index c01f099704..0000000000 --- a/bin/openapi3/android-petstore-all.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -./bin/openapi3/android-petstore-httpclient.sh -./bin/openapi3/android-petstore-volley.sh - diff --git a/bin/openapi3/android-petstore-httpclient.sh b/bin/openapi3/android-petstore-httpclient.sh deleted file mode 100755 index a16ff89917..0000000000 --- a/bin/openapi3/android-petstore-httpclient.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/android -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g android --additional-properties library=httpclient -o samples/client/petstore/android/httpclient $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/android-petstore-volley.sh b/bin/openapi3/android-petstore-volley.sh deleted file mode 100755 index 43160c95c6..0000000000 --- a/bin/openapi3/android-petstore-volley.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 -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g android -c bin/android-petstore-volley.json -o samples/client/petstore/android/volley $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/avro-petstore.sh b/bin/openapi3/avro-petstore.sh deleted file mode 100755 index 0098368e06..0000000000 --- a/bin/openapi3/avro-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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/avro-schema -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g avro-schema -o samples/openapi3/schema/petstore/avro-schema $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/bash-petstore.sh b/bin/openapi3/bash-petstore.sh deleted file mode 100755 index d247da5b8a..0000000000 --- a/bin/openapi3/bash-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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" -args="generate -t modules/openapi-generator/src/main/resources/bash -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g bash -o samples/client/petstore/bash -c modules/openapi-generator/src/test/resources/2_0/bash-config.json --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $args diff --git a/bin/openapi3/clojure-petstore.sh b/bin/openapi3/clojure-petstore.sh deleted file mode 100755 index 43e62b4005..0000000000 --- a/bin/openapi3/clojure-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.json -g clojure -o samples/client/petstore/clojure $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/cpp-pistache-server-petstore.sh b/bin/openapi3/cpp-pistache-server-petstore.sh deleted file mode 100755 index 739bf59df9..0000000000 --- a/bin/openapi3/cpp-pistache-server-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -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 -g cpp-pistache-server -t modules/openapi-generator/src/main/resources/cpp-pistache-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -o samples/server/petstore/cpp-pistache $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/cpp-qt5-petstore.sh b/bin/openapi3/cpp-qt5-petstore.sh deleted file mode 100755 index a5e0e94bd6..0000000000 --- a/bin/openapi3/cpp-qt5-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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/cpp-qt5-client -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g cpp-qt5-client -o samples/client/petstore/cpp-qt5 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/cpp-qt5-qhttpengine-server-petstore.sh b/bin/openapi3/cpp-qt5-qhttpengine-server-petstore.sh deleted file mode 100755 index e93f5130fe..0000000000 --- a/bin/openapi3/cpp-qt5-qhttpengine-server-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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/cpp-qt5-qhttpengine-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g cpp-qt5-qhttpengine-server -o samples/client/petstore/cpp-qt5-qhttpengine-server $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/cpp-restbed-petstore-server.sh b/bin/openapi3/cpp-restbed-petstore-server.sh deleted file mode 100755 index e896e6dcd7..0000000000 --- a/bin/openapi3/cpp-restbed-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -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 -g cpp-restbed-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -o samples/server/petstore/cpp-restbed $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/cpp-tizen-petstore.sh b/bin/openapi3/cpp-tizen-petstore.sh deleted file mode 100755 index 75378d4a51..0000000000 --- a/bin/openapi3/cpp-tizen-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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/cpp-tizen-client -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g cpp-tizen -o samples/client/petstore/cpp-tizen $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/csharp-dotnet2-petstore.sh b/bin/openapi3/csharp-dotnet2-petstore.sh deleted file mode 100755 index 7b0aa62696..0000000000 --- a/bin/openapi3/csharp-dotnet2-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g csharp-dotnet2 -o samples/client/petstore/csharp-dotnet2/OpenAPIClientTest/Lib/OpenAPIClient --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/csharp-petstore-net-standard.sh b/bin/openapi3/csharp-petstore-net-standard.sh deleted file mode 100755 index fff5b780e7..0000000000 --- a/bin/openapi3/csharp-petstore-net-standard.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 $@ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClientNetStandard --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} -c ./bin/csharp-petstore-net-standard.json" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/csharp-petstore.sh b/bin/openapi3/csharp-petstore.sh deleted file mode 100755 index 224d5ff207..0000000000 --- a/bin/openapi3/csharp-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate $@ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/openapi3/client/petstore/csharp/OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C}" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/csharp-property-changed-petstore.sh b/bin/openapi3/csharp-property-changed-petstore.sh deleted file mode 100755 index a3b11ad569..0000000000 --- a/bin/openapi3/csharp-property-changed-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate $@ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g csharp -o samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged --additional-properties generatePropertyChanged=true --additional-properties optionalEmitDefaultValues=true --additional-properties packageGuid={5CD900DE-8266-412F-A758-28E1F9C623D5}" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/dart-petstore.sh b/bin/openapi3/dart-petstore.sh deleted file mode 100755 index 2bab8d1aba..0000000000 --- a/bin/openapi3/dart-petstore.sh +++ /dev/null @@ -1,51 +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" - -# Generate non-browserClient -ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi --additional-properties hideGenerationTimestamp=true,browserClient=false $@" - -# then options to generate the library for vm would be: -#ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi_vm --additional-properties browserClient=false,pubName=openapi_vm $@" -#java $JAVA_OPTS -jar $executable $ags - -# Generate browserClient -ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/openapi-browser-client --additional-properties hideGenerationTimestamp=true,browserClient=true $@" -#java $JAVA_OPTS -jar $executable $ags - -# Generate non-browserClient and put it to the flutter sample app -ags="generate -t modules/openapi-generator/src/main/resources/dart -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g dart -o samples/client/petstore/dart/flutter_petstore/openapi --additional-properties hideGenerationTimestamp=true,browserClient=false $@" -java $JAVA_OPTS -jar $executable $ags - -# There is a proposal to allow importing different libraries depending on the environment: -# https://github.com/munificent/dep-interface-libraries -# When this is implemented there will only be one library. - -# The current petstore test will then work for both: the browser library and the vm library. - diff --git a/bin/openapi3/elixir-petstore.sh b/bin/openapi3/elixir-petstore.sh deleted file mode 100755 index 1ff5c13d32..0000000000 --- a/bin/openapi3/elixir-petstore.sh +++ /dev/null @@ -1,37 +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 - -# remove existing lib and model file -echo "removing existing lib, model files" -rm -Rf "samples/client/petstore/elixir/lib/swagger_petstore/model/" -rm -Rf "samples/client/petstore/elixir/lib/swagger_petstore/lib/" - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -args="generate -t modules/openapi-generator/src/main/resources/elixir -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g elixir -o samples/client/petstore/elixir/ $@" - -java $JAVA_OPTS -jar $executable $args diff --git a/bin/openapi3/elm.sh b/bin/openapi3/elm.sh deleted file mode 100755 index 9f7eba8ce3..0000000000 --- a/bin/openapi3/elm.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/elm.yaml -g elm -t modules/openapi-generator/src/main/resources/elm -o samples/openapi3/client/elm $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/finch-petstore-server.sh b/bin/openapi3/finch-petstore-server.sh deleted file mode 100755 index f6b4a46a42..0000000000 --- a/bin/openapi3/finch-petstore-server.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/scala-finch -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-finch -o samples/server/petstore/scala-finch" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/flash-petstore.sh b/bin/openapi3/flash-petstore.sh deleted file mode 100755 index 04fe76bd69..0000000000 --- a/bin/openapi3/flash-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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/flash -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g flash -o samples/client/petstore/flash -c bin/flash-petstore.json $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/go-experimental-petstore.sh b/bin/openapi3/go-experimental-petstore.sh deleted file mode 100755 index 901c8c62dc..0000000000 --- a/bin/openapi3/go-experimental-petstore.sh +++ /dev/null @@ -1,45 +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 - -#SPEC="modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml" -# petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml is the same as the above file, with -# the addition of the HTTP signature security scheme. Ideally, this would have been directly added to -# petstore-with-fake-endpoints-models-for-testing.yaml, but this cannot be done until issue #5025 is resolved. -SPEC="modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml" -GENERATOR="go-experimental" -STUB_DIR="samples/openapi3/client/petstore/go-experimental/go-petstore" - -echo "Removing files and folders under $STUB_DIR" -rm -rf $STUB_DIR - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/$GENERATOR -i $SPEC -g $GENERATOR -o $STUB_DIR" -ags="$ags --additional-properties enumClassPrefix=true,packageName=petstore" -ags="$ags $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/go-gin-petstore-server.sh b/bin/openapi3/go-gin-petstore-server.sh deleted file mode 100755 index 8ab2b8397e..0000000000 --- a/bin/openapi3/go-gin-petstore-server.sh +++ /dev/null @@ -1,41 +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 - -SPEC="modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml" -GENERATOR="go-gin-server" -STUB_DIR="samples/openapi3/server/petstore/go-gin-api-server" - -echo "Removing files and folders under $STUB_DIR" -rm -rf $STUB_DIR - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" - -ags="generate -t modules/openapi-generator/src/main/resources/go-gin-server -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstoreserver --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags -#!/usr/bin/env bash \ No newline at end of file diff --git a/bin/openapi3/go-petstore-server.sh b/bin/openapi3/go-petstore-server.sh deleted file mode 100755 index 7909ec7d5d..0000000000 --- a/bin/openapi3/go-petstore-server.sh +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -SPEC="modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml" -GENERATOR="go-server" -STUB_DIR="samples/openapi3/server/petstore/go-api-server" - -echo "Removing files and folders under $STUB_DIR" -rm -rf $STUB_DIR - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" - -ags="generate -t modules/openapi-generator/src/main/resources/go-server -i $SPEC -g $GENERATOR -o $STUB_DIR --additional-properties packageName=petstoreserver,hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/go-petstore.sh b/bin/openapi3/go-petstore.sh deleted file mode 100755 index f67ecfbbb6..0000000000 --- a/bin/openapi3/go-petstore.sh +++ /dev/null @@ -1,41 +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 - -SPEC="modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml" -GENERATOR="go" -STUB_DIR="samples/openapi3/client/petstore/go/go-petstore" - -echo "Removing files and folders under $STUB_DIR" -rm -rf $STUB_DIR - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/go -i $SPEC -g $GENERATOR -o $STUB_DIR" -ags="$ags --additional-properties enumClassPrefix=true,packageName=petstore" -ags="$ags $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/graphql-nodejs-express-server.sh b/bin/openapi3/graphql-nodejs-express-server.sh deleted file mode 100755 index 41a6951160..0000000000 --- a/bin/openapi3/graphql-nodejs-express-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties $@" -ags="generate -t modules/openapi-generator/src/main/resources/graphql-nodejs-express-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g graphql-nodejs-express-server -o samples/server/petstore/graphql-nodejs-express-server --additional-properties packageName=petstore $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/haskell-http-client-petstore.sh b/bin/openapi3/haskell-http-client-petstore.sh deleted file mode 100755 index 7eb116f540..0000000000 --- a/bin/openapi3/haskell-http-client-petstore.sh +++ /dev/null @@ -1,34 +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" - -args="generate -t modules/openapi-generator/src/main/resources/haskell-http-client -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g haskell-http-client -o samples/client/petstore/haskell-http-client $@" - -echo "java ${JAVA_OPTS} -jar ${executable} ${args}" -java $JAVA_OPTS -jar $executable $args diff --git a/bin/openapi3/haskell-servant-petstore.sh b/bin/openapi3/haskell-servant-petstore.sh deleted file mode 100755 index 2b289a580c..0000000000 --- a/bin/openapi3/haskell-servant-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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/haskell-servant -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g haskell -o samples/server/petstore/haskell-servant $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/java-petstore-jersey2-java8.json b/bin/openapi3/java-petstore-jersey2-java8.json deleted file mode 100644 index dd2a70a3c3..0000000000 --- a/bin/openapi3/java-petstore-jersey2-java8.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "library": "jersey2", - "artifactId": "petstore-openapi3-jersey2-java8", - "dateLibrary": "java8" -} diff --git a/bin/openapi3/java-petstore-jersey2-java8.sh b/bin/openapi3/java-petstore-jersey2-java8.sh deleted file mode 100755 index 8eb4da0f94..0000000000 --- a/bin/openapi3/java-petstore-jersey2-java8.sh +++ /dev/null @@ -1,44 +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" -yaml="modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml" -ags="generate --artifact-id petstore-openapi3-jersey2-java8 -i $yaml -g java -c bin/openapi3/java-petstore-jersey2-java8.json -o samples/openapi3/client/petstore/java/jersey2-java8 --additional-properties hideGenerationTimestamp=true --additional-properties serverPort=8082 $@" - -echo "Removing files and folders under samples/openapi3/client/petstore/java/jersey2-java8/src/main" -rm -rf samples/openapi3/client/petstore/java/jersey2-java8/src/main -find samples/openapi3/client/petstore/java/jersey2-java8 -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags - -# copy additional manually written unit-tests -mkdir -p samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client -mkdir -p samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/auth -mkdir -p samples/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/model - -cp CI/samples.ci/client/petstore/java/test-manual/jersey2-java8/JSONTest.java samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/JSONTest.java -cp CI/samples.ci/client/petstore/java/test-manual/jersey2-java8/JSONComposedSchemaTest.java samples/openapi3/client/petstore/java/jersey2-java8/src/test/java/org/openapitools/client/JSONComposedSchemaTest.java diff --git a/bin/openapi3/javascript-closure-angular.sh b/bin/openapi3/javascript-closure-angular.sh deleted file mode 100755 index a1a38da413..0000000000 --- a/bin/openapi3/javascript-closure-angular.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 -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g javascript-closure-angular -o samples/client/petstore/javascript-closure-angular $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/jaxrs-cxf-client-petstore.sh b/bin/openapi3/jaxrs-cxf-client-petstore.sh deleted file mode 100755 index edb3bfcf13..0000000000 --- a/bin/openapi3/jaxrs-cxf-client-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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 --artifact-id "jaxrs-cxf-petstore-client" -t modules/openapi-generator/src/main/resources/JavaJaxRS/cxf/ -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g jaxrs-cxf-client -o samples/client/petstore/jaxrs-cxf-client $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/jaxrs-jersey-petstore.sh b/bin/openapi3/jaxrs-jersey-petstore.sh deleted file mode 100755 index 8c54173116..0000000000 --- a/bin/openapi3/jaxrs-jersey-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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 --artifact-id "openapiv3-jaxrs-jersey-petstore-server" -t modules/openapi-generator/src/main/resources/JavaJaxRS/ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs-jersey --additional-properties hideGenerationTimestamp=true,serverPort=8080 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/kotlin-client-petstore-all.sh b/bin/openapi3/kotlin-client-petstore-all.sh deleted file mode 100755 index 951e2befa1..0000000000 --- a/bin/openapi3/kotlin-client-petstore-all.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - - -./bin/openapi3/kotlin-client-petstore.sh -./bin/openapi3/kotlin-client-petstore-multiplatform.sh -./bin/openapi3/kotlin-client-petstore-nullable-required.sh -./bin/openapi3/kotlin-client-petstore-retrofit2-coroutines.sh -./bin/openapi3/kotlin-client-petstore-retrofit2-rx.sh -./bin/openapi3/kotlin-client-petstore-retrofit2-rx2.sh diff --git a/bin/openapi3/kotlin-client-petstore-deprecated.sh b/bin/openapi3/kotlin-client-petstore-deprecated.sh deleted file mode 100644 index 8062ad9887..0000000000 --- a/bin/openapi3/kotlin-client-petstore-deprecated.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-depreacted-fields.yaml -t modules/openapi-generator/src/main/resources/kotlin-client -g kotlin --artifact-id kotlin-petstore-deprecated -o samples/openapi3/client/petstore/kotlin-deprecated $@" - -echo "Cleaning previously generated files if any from samples/openapi3/client/petstore/kotlin-deprecated" -rm -rf samples/openapi3/client/petstore/kotlin-deprecated - -echo "Generating Kotling client..." -java $JAVA_OPTS -jar $executable $ags \ No newline at end of file diff --git a/bin/openapi3/kotlin-client-petstore-multiplatform.sh b/bin/openapi3/kotlin-client-petstore-multiplatform.sh deleted file mode 100755 index 9ea0358394..0000000000 --- a/bin/openapi3/kotlin-client-petstore-multiplatform.sh +++ /dev/null @@ -1,37 +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 - -samplePath="samples/openapi3/client/petstore/kotlin-multiplatform" - -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -t modules/openapi-generator/src/main/resources/kotlin-client -g kotlin --artifact-id kotlin-client-petstore-multiplatform --library multiplatform -o $samplePath $@" - -echo "Cleaning previously generated files if any from $samplePath" -rm -rf $samplePath - -echo "Generating Kotling client..." -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/kotlin-client-petstore-nullable-required.sh b/bin/openapi3/kotlin-client-petstore-nullable-required.sh deleted file mode 100644 index a59f31ecb5..0000000000 --- a/bin/openapi3/kotlin-client-petstore-nullable-required.sh +++ /dev/null @@ -1,37 +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 - -samplePath="samples/openapi3/client/petstore/kotlin-nullable-required" - -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-nullable-required.yaml -t modules/openapi-generator/src/main/resources/kotlin-client -g kotlin --artifact-id kotlin-petstore-nullable-required --additional-properties allowRequiredAsNullable=true -o $samplePath $@" - -echo "Cleaning previously generated files if any from $samplePath" -rm -rf $samplePath - -echo "Generating Kotling client..." -java $JAVA_OPTS -jar $executable $ags \ No newline at end of file diff --git a/bin/openapi3/kotlin-client-petstore-retrofit2-coroutines.sh b/bin/openapi3/kotlin-client-petstore-retrofit2-coroutines.sh deleted file mode 100755 index 0c45c5584d..0000000000 --- a/bin/openapi3/kotlin-client-petstore-retrofit2-coroutines.sh +++ /dev/null @@ -1,37 +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 - -samplePath="samples/openapi3/client/petstore/kotlin-jvm-retrofit2-coroutines" - -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -t modules/openapi-generator/src/main/resources/kotlin-client -g kotlin --artifact-id kotlin-petstore-coroutines-client --library jvm-retrofit2 --additional-properties serializationLibrary=gson,dateLibrary=java8,serializableModel=true,useCoroutines=true -o $samplePath $@" - -echo "Cleaning previously generated files if any from $samplePath" -rm -rf $samplePath - -echo "Generating Kotling client..." -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/kotlin-client-petstore-retrofit2-rx.sh b/bin/openapi3/kotlin-client-petstore-retrofit2-rx.sh deleted file mode 100755 index fef65a303b..0000000000 --- a/bin/openapi3/kotlin-client-petstore-retrofit2-rx.sh +++ /dev/null @@ -1,37 +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 - -samplePath="samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx" - -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -t modules/openapi-generator/src/main/resources/kotlin-client -g kotlin --artifact-id kotlin-petstore-rx-client --library jvm-retrofit2 --additional-properties serializationLibrary=gson,dateLibrary=java8,serializableModel=true,useRxJava=true -o $samplePath $@" - -echo "Cleaning previously generated files if any from $samplePath" -rm -rf $samplePath - -echo "Generating Kotling client..." -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/kotlin-client-petstore-retrofit2-rx2.sh b/bin/openapi3/kotlin-client-petstore-retrofit2-rx2.sh deleted file mode 100755 index d6265f8fea..0000000000 --- a/bin/openapi3/kotlin-client-petstore-retrofit2-rx2.sh +++ /dev/null @@ -1,37 +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 - -samplePath="samples/openapi3/client/petstore/kotlin-jvm-retrofit2-rx2" - -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -t modules/openapi-generator/src/main/resources/kotlin-client -g kotlin --artifact-id kotlin-petstore-rx2-client --library jvm-retrofit2 --additional-properties serializationLibrary=gson,dateLibrary=java8,serializableModel=true,useRxJava2=true -o $samplePath $@" - -echo "Cleaning previously generated files if any from $samplePath" -rm -rf $samplePath - -echo "Generating Kotling client..." -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/kotlin-client-petstore.sh b/bin/openapi3/kotlin-client-petstore.sh deleted file mode 100755 index a36d42599b..0000000000 --- a/bin/openapi3/kotlin-client-petstore.sh +++ /dev/null @@ -1,37 +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 - -samplePath="samples/openapi3/client/petstore/kotlin" - -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -t modules/openapi-generator/src/main/resources/kotlin-client -g kotlin --artifact-id kotlin-petstore-client --additional-properties dateLibrary=java8,serializableModel=true -o $samplePath $@" - -echo "Cleaning previously generated files if any from $samplePath" -rm -rf $samplePath - -echo "Generating Kotling client..." -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/kotlin-springboot-petstore-all.sh b/bin/openapi3/kotlin-springboot-petstore-all.sh deleted file mode 100755 index 7aa4f697bb..0000000000 --- a/bin/openapi3/kotlin-springboot-petstore-all.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -./bin/openapi3/kotlin-springboot-petstore-server.sh -./bin/openapi3/kotlin-springboot-petstore-server-reactive.sh diff --git a/bin/openapi3/kotlin-springboot-petstore-server-reactive.sh b/bin/openapi3/kotlin-springboot-petstore-server-reactive.sh deleted file mode 100755 index f14abcd424..0000000000 --- a/bin/openapi3/kotlin-springboot-petstore-server-reactive.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="$@ generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-spring -g kotlin-spring -o samples/openapi3/server/petstore/kotlin-springboot-reactive --additional-properties=library=spring-boot,beanValidations=true,swaggerAnnotations=true,serviceImplementation=true,reactive=true" - -echo "Cleaning previously generated files if any from samples/server/openapi3/petstore/kotlin-springboot-reactive" -rm -rf samples/server/openapi3/petstore/kotlin-springboot-reactive - -echo "Generating Kotling Spring Boot server..." -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/kotlin-springboot-petstore-server.sh b/bin/openapi3/kotlin-springboot-petstore-server.sh deleted file mode 100755 index 8779e1a041..0000000000 --- a/bin/openapi3/kotlin-springboot-petstore-server.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="$@ generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -t modules/openapi-generator/src/main/resources/kotlin-spring -g kotlin-spring -o samples/openapi3/server/petstore/kotlin-springboot --additional-properties=library=spring-boot,beanValidations=true,swaggerAnnotations=true,serviceImplementation=true,serializableModel=true" - -echo "Cleaning previously generated files if any from samples/server/openapi3/petstore/kotlin-springboot" -rm -rf samples/server/openapi3/petstore/kotlin-springboot - -echo "Generating Kotling Spring Boot server..." -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/objc-petstore-coredata.sh b/bin/openapi3/objc-petstore-coredata.sh deleted file mode 100755 index ec36e2f510..0000000000 --- a/bin/openapi3/objc-petstore-coredata.sh +++ /dev/null @@ -1,33 +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 GENERATOR_GLOBALS="-DapiDocs=false -DmodelDocs=false" -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties ${GENERATOR_GLOBALS}" -ags="generate -t modules/openapi-generator/src/main/resources/objc -i modules/openapi-generator/src/test/resources/3_0/petstore.json -g objc -o samples/client/petstore/objc/core-data --additional-properties coreData=true,appName=PetstoreClient $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/objc-petstore.sh b/bin/openapi3/objc-petstore.sh deleted file mode 100755 index 5840e39a45..0000000000 --- a/bin/openapi3/objc-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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/objc -i modules/openapi-generator/src/test/resources/3_0/petstore.json -g objc -o samples/client/petstore/objc/default --additional-properties appName=PetstoreClient $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/perl-petstore.sh b/bin/openapi3/perl-petstore.sh deleted file mode 100755 index 7707591647..0000000000 --- a/bin/openapi3/perl-petstore.sh +++ /dev/null @@ -1,33 +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" -# complex module name used for testing -ags="generate -t modules/openapi-generator/src/main/resources/perl -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g perl -o samples/client/petstore/perl --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/php-laravel-petstore.sh b/bin/openapi3/php-laravel-petstore.sh deleted file mode 100755 index 97d2061f57..0000000000 --- a/bin/openapi3/php-laravel-petstore.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -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 - -# Make sure that the working directory is the root dir -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd "${SCRIPT_DIR}/../" - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -# Make sure that we are regenerating the sample by removing any existing target directory -TARGET_DIR="$SCRIPT_DIR/../../samples/server/petstore/php-laravel" -if [ -d "$TARGET_DIR" ]; then - rm -rf $TARGET_DIR -fi - -executable="$SCRIPT_DIR/../../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 $SCRIPT_DIR/../../modules/openapi-generator/src/main/resources/php-laravel -i $SCRIPT_DIR/../../modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php-laravel -o $TARGET_DIR $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/php-lumen-petstore-server.sh b/bin/openapi3/php-lumen-petstore-server.sh deleted file mode 100755 index 5b599415c7..0000000000 --- a/bin/openapi3/php-lumen-petstore-server.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/php-lumen -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php-lumen -o samples/server/petstore/php-lumen $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/php-petstore.sh b/bin/openapi3/php-petstore.sh deleted file mode 100755 index 18ab1224ee..0000000000 --- a/bin/openapi3/php-petstore.sh +++ /dev/null @@ -1,38 +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 - -# cleanup tests -TEST_DIR="./samples/openapi3/client/petstore/php/OpenAPIClient-php/test" -if [ -d $TEST_DIR ]; then - rm -rf $TEST_DIR -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/php -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php -o samples/openapi3/client/petstore/php/OpenAPIClient-php $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/php-silex-petstore-server.sh b/bin/openapi3/php-silex-petstore-server.sh deleted file mode 100755 index f3c33d37ec..0000000000 --- a/bin/openapi3/php-silex-petstore-server.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/php-silex -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php-silex-deprecated -o samples/server/petstore/php-silex/OpenAPIServer $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/php-slim-server-petstore.sh b/bin/openapi3/php-slim-server-petstore.sh deleted file mode 100755 index e497f4f027..0000000000 --- a/bin/openapi3/php-slim-server-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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/php-slim-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php-slim-deprecated -o samples/server/petstore/php-slim $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/php-slim4-server-petstore.sh b/bin/openapi3/php-slim4-server-petstore.sh deleted file mode 100755 index 904c4675b3..0000000000 --- a/bin/openapi3/php-slim4-server-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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/php-slim4-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php-slim4 -o samples/server/petstore/php-slim4 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/php-symfony-petstore.sh b/bin/openapi3/php-symfony-petstore.sh deleted file mode 100755 index 8c6ce35bd0..0000000000 --- a/bin/openapi3/php-symfony-petstore.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -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 - -# Make sure that the working directory is the root dir -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd "${SCRIPT_DIR}/../" - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -# Make sure that we are regenerating the sample by removing any existing target directory -TARGET_DIR="$SCRIPT_DIR/../../samples/openapi3/server/petstore/php-symfony/SymfonyBundle-php" -if [ -d "$TARGET_DIR" ]; then - rm -rf $TARGET_DIR -fi - -executable="$SCRIPT_DIR/../../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 $SCRIPT_DIR/../../modules/openapi-generator/src/main/resources/php-symfony -i $SCRIPT_DIR/../../modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php-symfony -o $TARGET_DIR $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/php-ze-ph-petstore-server.sh b/bin/openapi3/php-ze-ph-petstore-server.sh deleted file mode 100644 index 5b92d01310..0000000000 --- a/bin/openapi3/php-ze-ph-petstore-server.sh +++ /dev/null @@ -1,36 +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 - -input=modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -out_folder=samples/openapi3/server/petstore/php-ze-ph -resources=modules/openapi-generator/src/main/resources/php-ze-ph - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t $resources -i $input -g php-ze-ph -o $out_folder $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/plantuml-documentation-petstore.sh b/bin/openapi3/plantuml-documentation-petstore.sh deleted file mode 100644 index 61bdfbbcb4..0000000000 --- a/bin/openapi3/plantuml-documentation-petstore.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" - -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 -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/openapi3/python-experimental-petstore.sh b/bin/openapi3/python-experimental-petstore.sh deleted file mode 100755 index 20d0595485..0000000000 --- a/bin/openapi3/python-experimental-petstore.sh +++ /dev/null @@ -1,34 +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" -#yaml="modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml" -yaml="modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml" -ags="generate -t modules/openapi-generator/src/main/resources/python -i $yaml -g python-experimental -o samples/openapi3/client/petstore/python-experimental/ --additional-properties packageName=petstore_api $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/python-flask-petstore-python2.sh b/bin/openapi3/python-flask-petstore-python2.sh deleted file mode 100755 index b9afa34fcd..0000000000 --- a/bin/openapi3/python-flask-petstore-python2.sh +++ /dev/null @@ -1,50 +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. -input=modules/openapi-generator/src/test/resources/3_0/petstore-with-object-as-parameter.yaml -out_folder=samples/openapi3/server/petstore/python-flask-python2 -resources=modules/openapi-generator/src/main/resources/python-flask - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t $resources -i $input -g python-flask -o $out_folder -c bin/supportPython2.json $@" - -rm -rf $out_folder/.openapi* -rm -rf $out_folder/openapi_server -rm $out_folder/.dockerignore -rm $out_folder/.gitignore -rm $out_folder/.travis.yml -rm $out_folder/Dockerfile -rm $out_folder/git_push.sh -rm $out_folder/README.md -rm $out_folder/requirements.txt -rm $out_folder/setup.py -rm $out_folder/test-requirements.txt -rm $out_folder/tox.ini - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/python-flask-petstore.sh b/bin/openapi3/python-flask-petstore.sh deleted file mode 100755 index 6b0f03aa3d..0000000000 --- a/bin/openapi3/python-flask-petstore.sh +++ /dev/null @@ -1,50 +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. -input=modules/openapi-generator/src/test/resources/3_0/petstore-with-object-as-parameter.yaml -out_folder=samples/openapi3/server/petstore/python-flask -resources=modules/openapi-generator/src/main/resources/python-flask - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice" -ags="generate -t $resources -i $input -g python-flask -o $out_folder $@" - -rm -rf $out_folder/.openapi* -rm -rf $out_folder/openapi_server -rm $out_folder/.dockerignore -rm $out_folder/.gitignore -rm $out_folder/.travis.yml -rm $out_folder/Dockerfile -rm $out_folder/git_push.sh -rm $out_folder/README.md -rm $out_folder/requirements.txt -rm $out_folder/setup.py -rm $out_folder/test-requirements.txt -rm $out_folder/tox.ini - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/python-petstore.sh b/bin/openapi3/python-petstore.sh deleted file mode 100755 index c1dce94f9c..0000000000 --- a/bin/openapi3/python-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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/python -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/openapi3/client/petstore/python/ --additional-properties packageName=petstore_api $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/r-petstore.sh b/bin/openapi3/r-petstore.sh deleted file mode 100755 index 9ca5ed61d0..0000000000 --- a/bin/openapi3/r-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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/r -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g r -o samples/client/petstore/R --additional-properties packageName=petstore $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/run-all-petstore b/bin/openapi3/run-all-petstore deleted file mode 100755 index 4ee75b99f6..0000000000 --- a/bin/openapi3/run-all-petstore +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# this bash script will loop through all the .sh files under bin -# execute the script and check the result (exit code) to see if -# there's any error - -echo "IMPORTANT: this script should be run by the CI (e.g. Shippable) only. There's no need to run this script to update Petstore samples for all generators." -echo "Please press CTRL+C to stop or the script will continue in 10 seconds." - -sleep 10 - -successes=0 -failures=0 -export JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true -Dorg.slf4j.simpleLogger.defaultLogLevel=warn" -for SCRIPT in $(ls -l ./bin/openapi3/*.sh | grep -v all) -do - if [ -f ${SCRIPT} -a -x ${SCRIPT} ]; then - echo "Running $SCRIPT (output to /dev/null)" - ${SCRIPT} 2>&1 > /dev/null - rc=$? - if [[ ${rc} != 0 ]]; then - >&2 echo "ERROR!! FAILED TO RUN ${SCRIPT}" - ((failures+=1)) - else - ((successes+=1)) - fi - fi -done - -if (( failures > 0 )); then - >&2 echo "[ERROR] ${failures} out of $((failures+successes)) scripts failed." - exit 1 -else - echo "[SUCCESS] ${successes} generators finished." -fi diff --git a/bin/openapi3/rust-petstore.sh b/bin/openapi3/rust-petstore.sh deleted file mode 100755 index a4812fc909..0000000000 --- a/bin/openapi3/rust-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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/rust -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g rust -o samples/client/petstore/rust --additional-properties packageName=petstore_client $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/openapi3/typescript-angular-petstore-all.sh b/bin/openapi3/typescript-angular-petstore-all.sh deleted file mode 100755 index bb0d6d2479..0000000000 --- a/bin/openapi3/typescript-angular-petstore-all.sh +++ /dev/null @@ -1,49 +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" - -echo "Typescript Petstore API client (default)" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v2/default --additional-properties ngVersion=2 $@" -java $JAVA_OPTS -jar $executable $ags - -echo "Typescript Petstore API client (npm setting)" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-angular -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-angular-v2/npm --additional-properties ngVersion=2 $@" -java $JAVA_OPTS -jar $executable $ags - -echo "Typescript Petstore API client (with interfaces generated)" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v2/with-interfaces --additional-properties ngVersion=2,withInterfaces=true $@" -java $JAVA_OPTS -jar $executable $ags - -echo "Typescript Petstore API client (v4 { Adding InjectionToken Over OpaqueToken })" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-angular -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-angular-v4/npm --additional-properties ngVersion=4 $@" -java $JAVA_OPTS -jar $executable $ags - -echo "Typescript Petstore API client (v4.3 { Adding HttpClientModule over HttpModule })" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-angular -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-angular-v4.3/npm --additional-properties ngVersion=4.3 $@" -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-angular-v2-petstore-interfaces.sh b/bin/openapi3/typescript-angular-v2-petstore-interfaces.sh deleted file mode 100755 index 3d74ccc1a9..0000000000 --- a/bin/openapi3/typescript-angular-v2-petstore-interfaces.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v2/with-interfaces --additional-properties ngVersion=2,withInterfaces=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-angular-v2-petstore-with-npm.sh b/bin/openapi3/typescript-angular-v2-petstore-with-npm.sh deleted file mode 100755 index 0bb15f5e72..0000000000 --- a/bin/openapi3/typescript-angular-v2-petstore-with-npm.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-angular -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-angular-v2/npm --additional-properties ngVersion=2 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-angular-v2-petstore.sh b/bin/openapi3/typescript-angular-v2-petstore.sh deleted file mode 100755 index f495ce2b1f..0000000000 --- a/bin/openapi3/typescript-angular-v2-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v2/default --additional-properties ngVersion=2 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-angular-v4-petstore-with-npm.sh b/bin/openapi3/typescript-angular-v4-petstore-with-npm.sh deleted file mode 100755 index da00def7a0..0000000000 --- a/bin/openapi3/typescript-angular-v4-petstore-with-npm.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-angular -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-angular-v4/npm --additional-properties ngVersion=4 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-angular-v4.3-petstore-with-npm.sh b/bin/openapi3/typescript-angular-v4.3-petstore-with-npm.sh deleted file mode 100755 index 82de2c52ae..0000000000 --- a/bin/openapi3/typescript-angular-v4.3-petstore-with-npm.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-angular -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-angular-v4.3/npm --additional-properties ngVersion=4.3 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-angularjs-petstore.sh b/bin/openapi3/typescript-angularjs-petstore.sh deleted file mode 100755 index b0e617e588..0000000000 --- a/bin/openapi3/typescript-angularjs-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-angularjs -o samples/client/petstore/typescript-angularjs $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-aurelia-petstore.sh b/bin/openapi3/typescript-aurelia-petstore.sh deleted file mode 100755 index a5cee045ab..0000000000 --- a/bin/openapi3/typescript-aurelia-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-aurelia -o samples/client/petstore/typescript-aurelia/default $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-fetch-petstore-all.sh b/bin/openapi3/typescript-fetch-petstore-all.sh deleted file mode 100755 index c052045b10..0000000000 --- a/bin/openapi3/typescript-fetch-petstore-all.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -./bin/openapi3/typescript-fetch-petstore-target-es6.sh -./bin/openapi3/typescript-fetch-petstore-with-npm-version.sh -./bin/openapi3/typescript-fetch-petstore-interfaces.sh -./bin/openapi3/typescript-fetch-petstore.sh -./bin/openapi3/typescript-fetch-petstore-prefix-parameter-interfaces.sh diff --git a/bin/openapi3/typescript-fetch-petstore-interfaces.sh b/bin/openapi3/typescript-fetch-petstore-interfaces.sh deleted file mode 100755 index d1e21dfbca..0000000000 --- a/bin/openapi3/typescript-fetch-petstore-interfaces.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-fetch -o samples/client/petstore/typescript-fetch/builds/with-interfaces --additional-properties withInterfaces=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-fetch-petstore-prefix-parameter-interfaces.sh b/bin/openapi3/typescript-fetch-petstore-prefix-parameter-interfaces.sh deleted file mode 100755 index b4f24da653..0000000000 --- a/bin/openapi3/typescript-fetch-petstore-prefix-parameter-interfaces.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-fetch -o samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces --additional-properties prefixParameterInterfaces=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-fetch-petstore-target-es6.sh b/bin/openapi3/typescript-fetch-petstore-target-es6.sh deleted file mode 100755 index 1d452572ba..0000000000 --- a/bin/openapi3/typescript-fetch-petstore-target-es6.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 -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-fetch -c bin/typescript-fetch-petstore-target-es6.json -o samples/client/petstore/typescript-fetch/builds/es6-target $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-fetch-petstore-with-npm-version.sh b/bin/openapi3/typescript-fetch-petstore-with-npm-version.sh deleted file mode 100755 index 477c36e9bc..0000000000 --- a/bin/openapi3/typescript-fetch-petstore-with-npm-version.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 -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-fetch -c bin/typescript-fetch-petstore-with-npm-version.json -o samples/client/petstore/typescript-fetch/builds/with-npm-version $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-fetch-petstore.sh b/bin/openapi3/typescript-fetch-petstore.sh deleted file mode 100755 index 90d3062bd0..0000000000 --- a/bin/openapi3/typescript-fetch-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-fetch -o samples/client/petstore/typescript-fetch/builds/default $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-inversify-petstore.sh b/bin/openapi3/typescript-inversify-petstore.sh deleted file mode 100755 index 2dec4414c9..0000000000 --- a/bin/openapi3/typescript-inversify-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-inversify -o samples/client/petstore/typescript-inversify $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-jquery-petstore-all.sh b/bin/openapi3/typescript-jquery-petstore-all.sh deleted file mode 100755 index 7320a518c2..0000000000 --- a/bin/openapi3/typescript-jquery-petstore-all.sh +++ /dev/null @@ -1,37 +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" - -echo "Typescript Petstore API client (default)" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-jquery -o samples/client/petstore/typescript-jquery/default $@" -java $JAVA_OPTS -jar $executable $ags - -echo "Typescript Petstore API client (npm setting)" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-jquery -c bin/typescript-jquery-petstore-npm.json -o samples/client/petstore/typescript-jquery/npm $@" -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-jquery-petstore-with-npm.sh b/bin/openapi3/typescript-jquery-petstore-with-npm.sh deleted file mode 100755 index 2aee5b82bc..0000000000 --- a/bin/openapi3/typescript-jquery-petstore-with-npm.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-jquery -c bin/typescript-jquery-petstore-npm.json -o samples/client/petstore/typescript-jquery/npm $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-jquery-petstore.sh b/bin/openapi3/typescript-jquery-petstore.sh deleted file mode 100755 index 2054fecfee..0000000000 --- a/bin/openapi3/typescript-jquery-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-jquery -o samples/client/petstore/typescript-jquery/default $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-node-petstore-all.sh b/bin/openapi3/typescript-node-petstore-all.sh deleted file mode 100755 index 5597a52c58..0000000000 --- a/bin/openapi3/typescript-node-petstore-all.sh +++ /dev/null @@ -1,37 +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" - -echo "Typescript node Petstore API client (default setting)" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-node -o samples/client/petstore/typescript-node/default $@" -java $JAVA_OPTS -jar $executable $ags - -echo "Typescript node Petstore API client with npm setting" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-node -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-node/npm $@" -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-node-petstore-with-npm.sh b/bin/openapi3/typescript-node-petstore-with-npm.sh deleted file mode 100755 index a1b4b8c908..0000000000 --- a/bin/openapi3/typescript-node-petstore-with-npm.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-node -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-node/npm $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/typescript-node-petstore.sh b/bin/openapi3/typescript-node-petstore.sh deleted file mode 100755 index 45a6eec701..0000000000 --- a/bin/openapi3/typescript-node-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g typescript-node -o samples/client/petstore/typescript-node/default $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/openapi3/windows/csharp-netcore-petstore-netcore.bat b/bin/openapi3/windows/csharp-netcore-petstore-netcore.bat deleted file mode 100644 index 7d5454a189..0000000000 --- a/bin/openapi3/windows/csharp-netcore-petstore-netcore.bat +++ /dev/null @@ -1,14 +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\3_0\petstore-with-fake-endpoints-models-for-testing.yaml -g csharp-netcore -o samples\openapi3\client\petstore\csharp-netcore\OpenAPIClientCore --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C},useCompareNetObjects=true,targetFramework=netcoreapp2.0 - -java %JAVA_OPTS% -jar %executable% %ags% - -REM restore csproj file -echo "restore csproject file: CI\samples.ci\client\petstore\csharp-netcore\OpenAPIClientCore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj" -copy /b/v/y CI\samples.ci\client\petstore\csharp-netcore\OpenAPIClientCore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj samples\openapi3\client\petstore\csharp-netcore\OpenAPIClientCore\src\Org.OpenAPITools.Test\ diff --git a/bin/openapi3/windows/csharp-netcore-petstore.bat b/bin/openapi3/windows/csharp-netcore-petstore.bat deleted file mode 100644 index e99d5ab4a4..0000000000 --- a/bin/openapi3/windows/csharp-netcore-petstore.bat +++ /dev/null @@ -1,14 +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\3_0\petstore-with-fake-endpoints-models-for-testing.yaml -g csharp-netcore -o samples\openapi3\client\petstore\csharp-netcore\OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C},useCompareNetObjects=true - -java %JAVA_OPTS% -jar %executable% %ags% - -REM restore csproj file -echo "restore csproject file: CI\samples.ci\client\petstore\csharp-netcore\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj" -copy /b/v/y CI\samples.ci\client\petstore\csharp-netcore\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj samples\openapi3\client\petstore\csharp-netcore\OpenAPIClient\src\Org.OpenAPITools.Test\ diff --git a/bin/openapi3/windows/csharp-petstore.bat b/bin/openapi3/windows/csharp-petstore.bat deleted file mode 100755 index 5e8de764dc..0000000000 --- a/bin/openapi3/windows/csharp-petstore.bat +++ /dev/null @@ -1,14 +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 csharp -o samples\openapi3\client\petstore\csharp\SwaggerClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} - -java %JAVA_OPTS% -jar %executable% %ags% - -REM restore csproj file -echo "restore csproject file: CI\samples.ci\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj" -copy /b/v/y CI\samples.ci\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj samples\openapi3\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\ diff --git a/bin/openapi3/windows/kotlin-client-deprecated.bat b/bin/openapi3/windows/kotlin-client-deprecated.bat deleted file mode 100644 index f12a5178e4..0000000000 --- a/bin/openapi3/windows/kotlin-client-deprecated.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\3_0\petstore-with-depreacted-fields.yaml -g kotlin --artifact-id "kotlin-petstore-deprecated" -o samples\openapi3\client\petstore\kotlin-deprecated - -java %JAVA_OPTS% -jar %executable% %ags% \ No newline at end of file diff --git a/bin/openapi3/windows/kotlin-client-nullable-required.bat b/bin/openapi3/windows/kotlin-client-nullable-required.bat deleted file mode 100644 index dd7bf0d16a..0000000000 --- a/bin/openapi3/windows/kotlin-client-nullable-required.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\3_0\petstore-with-nullable-required.yaml -g kotlin --artifact-id "kotlin-petstore-nullable-required" --additional-properties allowRequiredAsNullable=true -o samples\openapi3\client\petstore\kotlin-nullable-required - -java %JAVA_OPTS% -jar %executable% %ags% \ No newline at end of file diff --git a/bin/openapi3/windows/kotlin-springboot-petstore-server.bat b/bin/openapi3/windows/kotlin-springboot-petstore-server.bat deleted file mode 100644 index 0f557f0cb3..0000000000 --- a/bin/openapi3/windows/kotlin-springboot-petstore-server.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\3_0\petstore.yaml -g kotlin-spring -o samples\openapi3\server\petstore\kotlin-springboot --additional-properties=library=spring-boot - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/openapi3/windows/nodejs-express-server-petstore.bat b/bin/openapi3/windows/nodejs-express-server-petstore.bat deleted file mode 100755 index 73cf61835f..0000000000 --- a/bin/openapi3/windows/nodejs-express-server-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g nodejs-express-server -o samples\openapi3\server\petstore\nodejs-express-server - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/openapi3/windows/php-petstore.bat b/bin/openapi3/windows/php-petstore.bat deleted file mode 100644 index edd5e5c45e..0000000000 --- a/bin/openapi3/windows/php-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\3_0\petstore-with-fake-endpoints-models-for-testing.yaml -g php -o samples\openapi3\client\petstore\php\OpenAPIClient-php - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/openapi3/windows/plantuml-documentation-petstore.bat b/bin/openapi3/windows/plantuml-documentation-petstore.bat deleted file mode 100644 index 8928568143..0000000000 --- a/bin/openapi3/windows/plantuml-documentation-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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "plantuml-petstore-documentation" -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/openapi3/windows/python-experimental-petstore.bat b/bin/openapi3/windows/python-experimental-petstore.bat deleted file mode 100644 index 29c097a557..0000000000 --- a/bin/openapi3/windows/python-experimental-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\3_0\petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml -g python-experimental -o samples\openapi3\client\petstore\python-experimental --additional-properties packageName=petstore_api - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/openapi3/windows/r-petstore.bat b/bin/openapi3/windows/r-petstore.bat deleted file mode 100755 index 6dac7327f3..0000000000 --- a/bin/openapi3/windows/r-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g r -o samples\client\petstore\R - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/openapi3/windows/run-all-petstore.cmd b/bin/openapi3/windows/run-all-petstore.cmd deleted file mode 100644 index 1e5c0fb4ed..0000000000 --- a/bin/openapi3/windows/run-all-petstore.cmd +++ /dev/null @@ -1,15 +0,0 @@ -REM this batch file will loop through all the .bat files under bin\openapi3\windows\ -REM execute the script and check the error level to see if there's any error - -echo IMPORTANT: this script should be run by the CI (e.g. appveyor) only. There's no need to run this script to update Petstore samples for all generators. -echo Please press CTRL+C to stop or the script will continue in 10 seconds. - -timeout 10 - -for /f "delims=" %%i in ('dir /b ".\bin\openapi3\windows\*.bat"') do ( - - CALL .\bin\openapi3\windows\%%i - - IF ERRORLEVEL 1 IF NOT ERRORLEVEL 2 exit /b 1 - -) diff --git a/bin/openapi3/windows/scala-sttp-petstore.bat b/bin/openapi3/windows/scala-sttp-petstore.bat deleted file mode 100755 index 3aaf98462a..0000000000 --- a/bin/openapi3/windows/scala-sttp-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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "scala-sttp-petstore" -t modules\openapi-generator\src\main\resources\scala-sttp -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g scala-sttp -o samples\openapi3\client\petstore\scala-sttp - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/perl-deep-module-petstore.sh b/bin/perl-deep-module-petstore.sh deleted file mode 100755 index 8e47a7d3b8..0000000000 --- a/bin/perl-deep-module-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" - -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" -# complex module name used for testing -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g perl -o samples/client/petstore/perl/deep_module_test --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags --additional-properties moduleName=Something::Deep -o samples/client/petstore/perl/deep_module_test diff --git a/bin/perl-petstore-all.sh b/bin/perl-petstore-all.sh deleted file mode 100755 index 084857fa28..0000000000 --- a/bin/perl-petstore-all.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -./bin/perl-petstore.sh -./bin/perl-deep-module-petstore.sh - diff --git a/bin/perl-petstore.sh b/bin/perl-petstore.sh deleted file mode 100755 index e4864503b1..0000000000 --- a/bin/perl-petstore.sh +++ /dev/null @@ -1,33 +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" -# complex module name used for testing -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g perl -o samples/client/petstore/perl --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/php-laravel-petstore-server.sh b/bin/php-laravel-petstore-server.sh deleted file mode 100755 index 6b13f6c540..0000000000 --- a/bin/php-laravel-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/php-laravel -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php-laravel -o samples/server/petstore/php-laravel $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/php-lumen-petstore-server.sh b/bin/php-lumen-petstore-server.sh deleted file mode 100755 index 3f940bd34a..0000000000 --- a/bin/php-lumen-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/php-lumen -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php-lumen -o samples/server/petstore/php-lumen $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/php-petstore.sh b/bin/php-petstore.sh deleted file mode 100755 index d15e004a1a..0000000000 --- a/bin/php-petstore.sh +++ /dev/null @@ -1,38 +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 - -# cleanup tests -TEST_DIR="./samples/client/petstore/php/OpenAPIClient-php/test" -if [ -d $TEST_DIR ]; then - rm -rf $TEST_DIR -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/php -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php -o samples/client/petstore/php/OpenAPIClient-php $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/php-silex-petstore-server.sh b/bin/php-silex-petstore-server.sh deleted file mode 100755 index c3f97b7023..0000000000 --- a/bin/php-silex-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/php-silex -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g php-silex-deprecated -o samples/server/petstore/php-silex/OpenAPIServer $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/php-slim-server-petstore.sh b/bin/php-slim-server-petstore.sh deleted file mode 100755 index b26b058959..0000000000 --- a/bin/php-slim-server-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/php-slim-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php-slim-deprecated -o samples/server/petstore/php-slim $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/php-slim4-server-petstore.sh b/bin/php-slim4-server-petstore.sh deleted file mode 100755 index a87ebbcc7a..0000000000 --- a/bin/php-slim4-server-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/php-slim4-server -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g php-slim4 -o samples/server/petstore/php-slim4 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/php-symfony-petstore.sh b/bin/php-symfony-petstore.sh deleted file mode 100755 index 44a46239a2..0000000000 --- a/bin/php-symfony-petstore.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -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 - -# Make sure that the working directory is the root dir -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -cd "${SCRIPT_DIR}/../" - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -# Make sure that we are regenerating the sample by removing any existing target directory -TARGET_DIR="$SCRIPT_DIR/../samples/server/petstore/php-symfony/SymfonyBundle-php" -if [ -d "$TARGET_DIR" ]; then - rm -rf $TARGET_DIR -fi - -executable="$SCRIPT_DIR/../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 $SCRIPT_DIR/../modules/openapi-generator/src/main/resources/php-symfony -i $SCRIPT_DIR/../modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g php-symfony -o $TARGET_DIR $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/php-ze-ph-petstore-server.sh b/bin/php-ze-ph-petstore-server.sh deleted file mode 100755 index 371e65fe46..0000000000 --- a/bin/php-ze-ph-petstore-server.sh +++ /dev/null @@ -1,36 +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 - -input=modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -out_folder=samples/server/petstore/php-ze-ph -resources=modules/openapi-generator/src/main/resources/php-ze-ph - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t $resources -i $input -g php-ze-ph -o $out_folder $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/plantuml-documentation-petstore.sh b/bin/plantuml-documentation-petstore.sh deleted file mode 100755 index 8274059005..0000000000 --- a/bin/plantuml-documentation-petstore.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" - -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/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/powershell-config.json b/bin/powershell-config.json deleted file mode 100644 index 72db80af89..0000000000 --- a/bin/powershell-config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "skipFormModel": true -} diff --git a/bin/powershell-petstore.sh b/bin/powershell-petstore.sh deleted file mode 100755 index 264e58d9f5..0000000000 --- a/bin/powershell-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=$(ls -ld "$SCRIPT") - link=$(expr "$ls" : '.*-> \(.*\)$') - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=$(dirname "$SCRIPT")/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=$(dirname "$SCRIPT")/.. - APP_DIR=$(cd "${APP_DIR}"; pwd) -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/powershell -i modules/openapi-generator/src/test/resources/3_0/powershell/petstore.yaml -g powershell -o samples/client/petstore/powershell --additional-properties powershellGalleryUrl=https://www.powershellgallery.com/packages/PSPetstore,packageGuid=a27b908d-2a20-467f-bc32-af6f3a654ac5,packageName=PSPetstore,apiNamePrefix=PS,packageVersion=0.1.2,commonVerbs=Delete=Remove:Patch=Update $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/protobuf-schema-petstore.sh b/bin/protobuf-schema-petstore.sh deleted file mode 100755 index 09b132ad26..0000000000 --- a/bin/protobuf-schema-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties $@" -ags="generate -t modules/openapi-generator/src/main/resources/protobuf-schema -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g protobuf-schema -o samples/config/petstore/protobuf-schema --additional-properties packageName=petstore $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/python-asyncio-petstore.sh b/bin/python-asyncio-petstore.sh deleted file mode 100755 index 4219e51927..0000000000 --- a/bin/python-asyncio-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package $@ -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/client/petstore/python-asyncio --additional-properties packageName=petstore_api --library asyncio $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/python-experimental-petstore.sh b/bin/python-experimental-petstore.sh deleted file mode 100755 index 8a64ca9889..0000000000 --- a/bin/python-experimental-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package $@ -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml -g python-experimental -o samples/client/petstore/python-experimental --additional-properties packageName=petstore_api --additional-properties disallowAdditionalPropertiesIfNotPresent=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/python-petstore-all.sh b/bin/python-petstore-all.sh deleted file mode 100755 index 86c179eaa0..0000000000 --- a/bin/python-petstore-all.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# update python petstore clients - -./bin/python-asyncio-petstore.sh -./bin/python-petstore.sh -./bin/python-experimental-petstore.sh -./bin/python-tornado-petstore.sh diff --git a/bin/python-petstore.sh b/bin/python-petstore.sh deleted file mode 100755 index 651fda1e72..0000000000 --- a/bin/python-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package $@ -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/client/petstore/python --additional-properties packageName=petstore_api $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/python-server-aiohttp-petstore.sh b/bin/python-server-aiohttp-petstore.sh deleted file mode 100755 index f5cc9bc711..0000000000 --- a/bin/python-server-aiohttp-petstore.sh +++ /dev/null @@ -1,44 +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 - -generator=python-aiohttp -input=modules/openapi-generator/src/test/resources/2_0/petstore.yaml -out_folder=samples/server/petstore/$generator -resources=modules/openapi-generator/src/main/resources/$generator - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice" -ags="generate -t $resources -i $input -g $generator -o $out_folder $@" - -rm -rf $out_folder/.openapi* -rm -rf $out_folder/openapi_server -rm -rf $out_folder/tests* -rm $out_folder/README.md -rm $out_folder/requirements.txt -rm $out_folder/test-requirements.txt - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/python-server-aiohttp-srclayout-petstore.sh b/bin/python-server-aiohttp-srclayout-petstore.sh deleted file mode 100755 index 126e2d9fcc..0000000000 --- a/bin/python-server-aiohttp-srclayout-petstore.sh +++ /dev/null @@ -1,44 +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 - -generator=python-aiohttp -input=modules/openapi-generator/src/test/resources/2_0/petstore.yaml -out_folder=samples/server/petstore/${generator}-srclayout -resources=modules/openapi-generator/src/main/resources/${generator} - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice" -ags="generate -t $resources -i $input -g $generator -o $out_folder --additional-properties pythonSrcRoot=src $@" - -rm -rf $out_folder/.openapi* -rm -rf $out_folder/openapi_server -rm -rf $out_folder/tests* -rm $out_folder/README.md -rm $out_folder/requirements.txt -rm $out_folder/test-requirements.txt - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/python-server-all.sh b/bin/python-server-all.sh deleted file mode 100755 index c4fa204d1c..0000000000 --- a/bin/python-server-all.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -./bin/python-server-aiohttp-petstore.sh -./bin/python-server-aiohttp-srclayout-petstore.sh -./bin/python-server-flask-petstore.sh -./bin/python-server-flask-petstore-python2.sh -./bin/python-server-blueplanet-petstore.sh diff --git a/bin/python-server-blueplanet-petstore.sh b/bin/python-server-blueplanet-petstore.sh deleted file mode 100755 index bf2bfe771d..0000000000 --- a/bin/python-server-blueplanet-petstore.sh +++ /dev/null @@ -1,44 +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 - -generator=python-blueplanet -input=modules/openapi-generator/src/test/resources/2_0/petstore.yaml -out_folder=samples/server/petstore/$generator -resources=modules/openapi-generator/src/main/resources/$generator - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice" -ags="generate -t $resources -i $input -g $generator -o $out_folder $@" - -rm -rf $out_folder/.openapi* -rm -rf $out_folder/openapi_server -rm -rf $out_folder/tests* -rm -f $out_folder/README.md -rm -f $out_folder/requirements.txt -rm -f $out_folder/test-requirements.txt - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/python-server-flask-petstore-python2.sh b/bin/python-server-flask-petstore-python2.sh deleted file mode 100755 index f720fd5d4f..0000000000 --- a/bin/python-server-flask-petstore-python2.sh +++ /dev/null @@ -1,49 +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 - -generator=python-flask -input=modules/openapi-generator/src/test/resources/2_0/petstore.yaml -out_folder=samples/server/petstore/$generator-python2 -resources=modules/openapi-generator/src/main/resources/$generator - -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t $resources -i $input -g $generator -o $out_folder -c bin/supportPython2.json $@" - -rm -rf $out_folder/.openapi* -rm -rf $out_folder/openapi_server -rm $out_folder/.dockerignore -rm $out_folder/.gitignore -rm $out_folder/.travis.yml -rm $out_folder/Dockerfile -rm $out_folder/git_push.sh -rm $out_folder/README.md -rm $out_folder/requirements.txt -rm $out_folder/setup.py -rm $out_folder/test-requirements.txt -rm $out_folder/tox.ini - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/python-server-flask-petstore.sh b/bin/python-server-flask-petstore.sh deleted file mode 100755 index eead0ce0d4..0000000000 --- a/bin/python-server-flask-petstore.sh +++ /dev/null @@ -1,50 +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 - -generator=python-flask -input=modules/openapi-generator/src/test/resources/2_0/petstore.yaml -out_folder=samples/server/petstore/$generator -resources=modules/openapi-generator/src/main/resources/$generator - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties -Dservice" -ags="generate -t $resources -i $input -g $generator -o $out_folder $@" - -rm -rf $out_folder/.openapi* -rm -rf $out_folder/openapi_server -rm $out_folder/.dockerignore -rm $out_folder/.gitignore -rm $out_folder/.travis.yml -rm $out_folder/Dockerfile -rm $out_folder/git_push.sh -rm $out_folder/README.md -rm $out_folder/requirements.txt -rm $out_folder/setup.py -rm $out_folder/test-requirements.txt -rm $out_folder/tox.ini - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/python-tornado-petstore.sh b/bin/python-tornado-petstore.sh deleted file mode 100755 index 1d51e798fe..0000000000 --- a/bin/python-tornado-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package $@ -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/python -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g python -o samples/client/petstore/python-tornado --additional-properties packageName=petstore_api --library tornado $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/r-petstore.sh b/bin/r-petstore.sh deleted file mode 100755 index 4decf28f72..0000000000 --- a/bin/r-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/r -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g r -o samples/client/petstore/R --additional-properties packageName=petstore $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/ruby-client-petstore-faraday.sh b/bin/ruby-client-petstore-faraday.sh deleted file mode 100755 index 502cc689fe..0000000000 --- a/bin/ruby-client-petstore-faraday.sh +++ /dev/null @@ -1,43 +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 - -# purge lib/doc folder -echo "purge ruby petstore lib, docs folder" -rm -Rf samples/client/petstore/ruby-faraday/lib -rm -Rf samples/client/petstore/ruby-faraday/docs - -# purge test files other than integration test -# NOTE: spec/custom/*.rb and spec/petstore_helper.rb are not generated files -echo "purge ruby petstore spec" -find samples/client/petstore/ruby-faraday/spec -type d -not -name spec -not -name custom | xargs rm -Rf -find samples/client/petstore/ruby-faraday/spec -type f -not -name petstore_helper.rb -not -iwholename '*/spec/custom/*' | xargs rm -Rf - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/ruby-client -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ruby -c bin/ruby-petstore-faraday.json -o samples/client/petstore/ruby-faraday --global-property skipFormModel=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/ruby-client-petstore.sh b/bin/ruby-client-petstore.sh deleted file mode 100755 index 8a92eb8f1a..0000000000 --- a/bin/ruby-client-petstore.sh +++ /dev/null @@ -1,43 +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 - -# purge lib/doc folder -echo "purge ruby petstore lib, docs folder" -rm -Rf samples/client/petstore/ruby/lib -rm -Rf samples/client/petstore/ruby/docs - -# purge test files other than integration test -# NOTE: spec/custom/*.rb and spec/petstore_helper.rb are not generated files -echo "purge ruby petstore spec" -find samples/client/petstore/ruby/spec -type d -not -name spec -not -name custom | xargs rm -Rf -find samples/client/petstore/ruby/spec -type f -not -name petstore_helper.rb -not -iwholename '*/spec/custom/*' | xargs rm -Rf - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/ruby-client -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g ruby -c bin/ruby-petstore.json -o samples/client/petstore/ruby --global-property skipFormModel=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/ruby-on-rails-server-petstore.sh b/bin/ruby-on-rails-server-petstore.sh deleted file mode 100755 index 3cb83a0c51..0000000000 --- a/bin/ruby-on-rails-server-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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/ruby-on-rails-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g ruby-on-rails -o samples/server/petstore/ruby-on-rails $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/ruby-petstore-faraday.json b/bin/ruby-petstore-faraday.json deleted file mode 100644 index 21974c307f..0000000000 --- a/bin/ruby-petstore-faraday.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "gemName": "petstore", - "moduleName": "Petstore", - "library": "faraday", - "gemVersion": "1.0.0" -} diff --git a/bin/ruby-petstore.json b/bin/ruby-petstore.json deleted file mode 100644 index 8e597283f8..0000000000 --- a/bin/ruby-petstore.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "gemName": "petstore", - "library": "typhoeus", - "moduleName": "Petstore", - "gemVersion": "1.0.0", - "strictSpecBehavior": false -} diff --git a/bin/ruby-sinatra-server-petstore.sh b/bin/ruby-sinatra-server-petstore.sh deleted file mode 100755 index 88701e4879..0000000000 --- a/bin/ruby-sinatra-server-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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/ruby-sinatra-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g ruby-sinatra -o samples/server/petstore/ruby-sinatra $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/run-all-petstore b/bin/run-all-petstore deleted file mode 100755 index b709a303b4..0000000000 --- a/bin/run-all-petstore +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# this bash script will loop through all the .sh files under bin -# execute the script and check the result (exit code) to see if -# there's any error - -echo "IMPORTANT: this script should be run by the CI (e.g. Shippable) only. There's no need to run this script to update Petstore samples for all generators." -echo "Please press CTRL+C to stop or the script will continue in 10 seconds." - -sleep 10 - -successes=0 -failures=0 -for SCRIPT in $(ls -l ./bin/*.sh | grep -v all) -do - if [ -f ${SCRIPT} -a -x ${SCRIPT} ]; then - echo "Running $SCRIPT (output to /dev/null)" - ${SCRIPT} 2>&1 > /dev/null - rc=$? - if [[ ${rc} != 0 ]]; then - >&2 echo "ERROR!! FAILED TO RUN ${SCRIPT}" - ((failures+=1)) - else - ((successes+=1)) - fi - fi -done - -if (( failures > 0 )); then - >&2 echo "[ERROR] ${failures} out of $((failures+successes)) scripts failed." - exit 1 -else - echo "[SUCCESS] ${successes} generators finished." -fi diff --git a/bin/rust-petstore-reqwest-async.sh b/bin/rust-petstore-reqwest-async.sh deleted file mode 100755 index 65a1d1b4a5..0000000000 --- a/bin/rust-petstore-reqwest-async.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties $@" -ags="generate -t modules/openapi-generator/src/main/resources/rust -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g rust --library reqwest -o samples/client/petstore/rust/reqwest/petstore-async --additional-properties supportAsync=true,useSingleRequestParameter=true,packageName=petstore-reqwest-async $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/rust-petstore.sh b/bin/rust-petstore.sh deleted file mode 100755 index bee0348ca0..0000000000 --- a/bin/rust-petstore.sh +++ /dev/null @@ -1,47 +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" - -for spec_path in \ - modules/openapi-generator/src/test/resources/2_0/petstore.yaml \ - modules/openapi-generator/src/test/resources/3_0/rust/rust-test.yaml \ - modules/openapi-generator/src/test/resources/2_0/fileResponseTest.json\ - ; do - spec=$(basename "$spec_path" | sed 's/.yaml//' | sed 's/.json//' ) - - for library in hyper reqwest; do - args="generate --template-dir modules/openapi-generator/src/main/resources/rust - --input-spec $spec_path - --generator-name rust - --output samples/client/petstore/rust/$library/$spec - --additional-properties packageName=${spec}-${library},supportAsync=false - --library=$library $@" - java ${JAVA_OPTS} -jar ${executable} ${args} || exit 1 - done -done diff --git a/bin/rust-server-petstore.sh b/bin/rust-server-petstore.sh deleted file mode 100755 index f1ded085f6..0000000000 --- a/bin/rust-server-petstore.sh +++ /dev/null @@ -1,46 +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 - -for spec_path in modules/openapi-generator/src/test/resources/*/rust-server/* ; do - echo "Generating: $spec_path" - export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" - spec=$(basename "$spec_path" | sed 's/.yaml//') - args="generate --template-dir modules/openapi-generator/src/main/resources/rust-server - --input-spec $spec_path - --generator-name rust-server - --output samples/server/petstore/rust-server/output/$spec - --additional-properties packageName=$spec - --additional-properties hideGenerationTimestamp=true - --generate-alias-as-model - $@" - - java $JAVA_OPTS -jar $executable $args - - if [ $? -ne 0 ]; then - exit $? - fi -done diff --git a/bin/scala-akka-http-server-petstore.sh b/bin/scala-akka-http-server-petstore.sh deleted file mode 100755 index 83f97fca79..0000000000 --- a/bin/scala-akka-http-server-petstore.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" - -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 -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-akka-http-server -o samples/server/petstore/scala-akka-http-server $@" - -java ${JAVA_OPTS} -jar ${executable} ${ags} diff --git a/bin/scala-akka-petstore.sh b/bin/scala-akka-petstore.sh deleted file mode 100755 index 037fa6a962..0000000000 --- a/bin/scala-akka-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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 --artifact-id "scala-akka-petstore-client" -t modules/openapi-generator/src/main/resources/scala-akka-client -i modules/openapi-generator/src/test/resources/3_0/scala-akka/petstore.yaml -g scala-akka -o samples/client/petstore/scala-akka $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/scala-finch-petstore-server.sh b/bin/scala-finch-petstore-server.sh deleted file mode 100755 index 08fd0ae1e7..0000000000 --- a/bin/scala-finch-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/scala-finch -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-finch -o samples/server/petstore/scala-finch --global-property skipFormModel=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/scala-gatling-petstore.sh b/bin/scala-gatling-petstore.sh deleted file mode 100755 index 227ad58c3d..0000000000 --- a/bin/scala-gatling-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/scala-gatling -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-gatling -o samples/client/petstore/scala-gatling $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/scala-httpclient-petstore.sh b/bin/scala-httpclient-petstore.sh deleted file mode 100755 index d3629abc47..0000000000 --- a/bin/scala-httpclient-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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/scala-httpclient -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-httpclient-deprecated -o samples/client/petstore/scala-httpclient $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/scala-lagom-server-petstore.sh b/bin/scala-lagom-server-petstore.sh deleted file mode 100755 index ff9ab8ce71..0000000000 --- a/bin/scala-lagom-server-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/scala-lagom-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-lagom-server -o samples/server/petstore/scala-lagom-server --global-property skipFormModel=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/scala-play-framework-petstore.sh b/bin/scala-play-framework-petstore.sh deleted file mode 100755 index 90258c2a59..0000000000 --- a/bin/scala-play-framework-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/scala-play-server -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-play-server -o samples/server/petstore/scala-play-server --additional-properties hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/scala-sttp-petstore.sh b/bin/scala-sttp-petstore.sh deleted file mode 100755 index 3521fd6e41..0000000000 --- a/bin/scala-sttp-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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 --artifact-id 'scala-sttp-petstore' -t modules/openapi-generator/src/main/resources/scala-sttp -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scala-sttp -o samples/client/petstore/scala-sttp $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/scalatra-petstore-server.sh b/bin/scalatra-petstore-server.sh deleted file mode 100755 index 04d037b89c..0000000000 --- a/bin/scalatra-petstore-server.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/scalatra -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scalatra -o samples/server/petstore/scalatra $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/scalaz-petstore.sh b/bin/scalaz-petstore.sh deleted file mode 100755 index dca1f9544f..0000000000 --- a/bin/scalaz-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn 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/scalaz -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g scalaz -o samples/client/petstore/scalaz --global-property skipFormModel=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/spring-all-petstore.sh b/bin/spring-all-petstore.sh deleted file mode 100755 index 3f3536cf1a..0000000000 --- a/bin/spring-all-petstore.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -# Generate clients: -./bin/spring-cloud-feign-petstore.sh -./bin/spring-cloud-feign-async-petstore.sh -./bin/spring-stubs.sh - -# Generate spring-mvc servers: -./bin/spring-mvc-petstore-server.sh -./bin/spring-mvc-petstore-j8-async-server.sh -./bin/spring-mvc-petstore-j8-localdatetime.sh - -# Generate springboot servers: -./bin/spring-delegate.sh -./bin/spring-delegate-j8.sh -./bin/springboot-petstore-server.sh -./bin/springboot-petstore-server-reactive.sh -./bin/springboot-petstore-server-beanvalidation.sh -./bin/springboot-petstore-server-implicitHeaders.sh -./bin/springboot-petstore-server-useOptional.sh -./bin/springboot-virtualan-petstore-server.sh \ No newline at end of file diff --git a/bin/spring-cloud-feign-async-petstore.sh b/bin/spring-cloud-feign-async-petstore.sh deleted file mode 100755 index ec2df40897..0000000000 --- a/bin/spring-cloud-feign-async-petstore.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g spring -c bin/spring-cloud-feign-petstore.json -o samples/client/petstore/spring-cloud-async --additional-properties hideGenerationTimestamp=true,java8=true,async=true $@" - -echo "Removing files and folders under samples/client/petstore/spring-cloud-async/src/main" -rm -rf samples/client/petstore/spring-cloud-async/src/main -find samples/client/petstore/spring-cloud-async -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/spring-cloud-feign-petstore.json b/bin/spring-cloud-feign-petstore.json deleted file mode 100644 index 572f58c1c7..0000000000 --- a/bin/spring-cloud-feign-petstore.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "library": "spring-cloud", - "artifactId": "petstore-spring-cloud" -} diff --git a/bin/spring-cloud-feign-petstore.sh b/bin/spring-cloud-feign-petstore.sh deleted file mode 100755 index 2dfef88064..0000000000 --- a/bin/spring-cloud-feign-petstore.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring/libraries/spring-cloud -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g spring -c bin/spring-cloud-feign-petstore.json -o samples/client/petstore/spring-cloud --additional-properties hideGenerationTimestamp=true,responseWrapper=HystrixCommand $@" - -echo "Removing files and folders under samples/client/petstore/spring-cloud/src/main" -rm -rf samples/client/petstore/spring-cloud/src/main -find samples/client/petstore/spring-cloud -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/spring-delegate-j8.sh b/bin/spring-delegate-j8.sh deleted file mode 100755 index df75a5d169..0000000000 --- a/bin/spring-delegate-j8.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id springboot-delegate-j8 -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-delegate-j8 --additional-properties delegatePattern=true,hideGenerationTimestamp=true $@" - -echo "Removing files and folders under samples/server/petstore/springboot-delegate-j8/src/main" -rm -rf samples/server/petstore/springboot-delegate-j8/src/main -find samples/server/petstore/springboot-delegate-j8/ -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/spring-delegate.sh b/bin/spring-delegate.sh deleted file mode 100755 index 2404c24ced..0000000000 --- a/bin/spring-delegate.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id springboot-delegate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-delegate --additional-properties delegatePattern=true,hideGenerationTimestamp=true,java8=false $@" - -echo "Removing files and folders under samples/server/petstore/springboot-delegate/src/main" -rm -rf samples/server/petstore/springboot-delegate/src/main -find samples/server/petstore/springboot-delegate/ -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/spring-mvc-petstore-j8-async-server.sh b/bin/spring-mvc-petstore-j8-async-server.sh deleted file mode 100755 index fdbb35d4b4..0000000000 --- a/bin/spring-mvc-petstore-j8-async-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/spring-mvc-j8-async -c bin/spring-mvc-petstore-j8-async.json --additional-properties hideGenerationTimestamp=true,async=true --additional-properties serverPort=8002 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/spring-mvc-petstore-j8-async.json b/bin/spring-mvc-petstore-j8-async.json deleted file mode 100644 index b73cbb09fe..0000000000 --- a/bin/spring-mvc-petstore-j8-async.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "java8": true, - "async": true, - "library": "spring-mvc", - "artifactId": "spring-mvc-server-j8-async" -} diff --git a/bin/spring-mvc-petstore-j8-localdatetime.json b/bin/spring-mvc-petstore-j8-localdatetime.json deleted file mode 100644 index 6eeb5d2144..0000000000 --- a/bin/spring-mvc-petstore-j8-localdatetime.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "library": "spring-mvc", - "dateLibrary": "java8-localdatetime", - "artifactId": "spring-mvc-j8-localdatetime" -} diff --git a/bin/spring-mvc-petstore-j8-localdatetime.sh b/bin/spring-mvc-petstore-j8-localdatetime.sh deleted file mode 100755 index ae3b16177a..0000000000 --- a/bin/spring-mvc-petstore-j8-localdatetime.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/spring-mvc-petstore-j8-localdatetime.json -o samples/server/petstore/spring-mvc-j8-localdatetime --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=get,serverPort=8002 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/spring-mvc-petstore-server.json b/bin/spring-mvc-petstore-server.json deleted file mode 100644 index d07026ffcb..0000000000 --- a/bin/spring-mvc-petstore-server.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "library": "spring-mvc", - "artifactId": "spring-mvc-server" -} diff --git a/bin/spring-mvc-petstore-server.sh b/bin/spring-mvc-petstore-server.sh deleted file mode 100755 index ddbb1b4d64..0000000000 --- a/bin/spring-mvc-petstore-server.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/spring-mvc-petstore-server.json -o samples/server/petstore/spring-mvc --additional-properties hideGenerationTimestamp=true,java8=false --additional-properties serverPort=8002 --additional-properties booleanGetterPrefix=get $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/spring-stubs.sh b/bin/spring-stubs.sh deleted file mode 100755 index 79edfa1820..0000000000 --- a/bin/spring-stubs.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id spring-stubs -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g spring -o samples/client/petstore/spring-stubs --additional-properties interfaceOnly=true,singleContentTypes=true,hideGenerationTimestamp=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/springboot-petstore-server-beanvalidation.json b/bin/springboot-petstore-server-beanvalidation.json deleted file mode 100644 index 21db69b6d8..0000000000 --- a/bin/springboot-petstore-server-beanvalidation.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "artifactId": "spring-boot-beanvalidation", - "library": "spring-boot", - "useBeanValidation": true -} diff --git a/bin/springboot-petstore-server-beanvalidation.sh b/bin/springboot-petstore-server-beanvalidation.sh deleted file mode 100755 index 33b1fdce58..0000000000 --- a/bin/springboot-petstore-server-beanvalidation.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-beanvalidation -c bin/springboot-petstore-server-beanvalidation.json --additional-properties hideGenerationTimestamp=true,java8=false $@" - -echo "Removing files and folders under samples/server/petstore/springboot-beanvalidation/src/main" -rm -rf samples/server/petstore/springboot-beanvalidation/src/main -find samples/server/petstore/springboot-beanvalidation -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/springboot-petstore-server-implicitHeaders.json b/bin/springboot-petstore-server-implicitHeaders.json deleted file mode 100644 index 8b76ddb5d2..0000000000 --- a/bin/springboot-petstore-server-implicitHeaders.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "implicitHeaders": true -} \ No newline at end of file diff --git a/bin/springboot-petstore-server-implicitHeaders.sh b/bin/springboot-petstore-server-implicitHeaders.sh deleted file mode 100755 index 277c57fcbd..0000000000 --- a/bin/springboot-petstore-server-implicitHeaders.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id springboot-implicitHeaders -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/springboot-petstore-server-implicitHeaders.json -o samples/server/petstore/springboot-implicitHeaders --additional-properties hideGenerationTimestamp=true $@" - -echo "Removing files and folders under samples/server/petstore/springboot-implicitHeaders/src/main" -rm -rf samples/server/petstore/springboot-implicitHeaders/src/main -find samples/server/petstore/springboot-implicitHeaders -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/springboot-petstore-server-reactive.sh b/bin/springboot-petstore-server-reactive.sh deleted file mode 100755 index 6cc531e66e..0000000000 --- a/bin/springboot-petstore-server-reactive.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" - -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 --artifact-id springboot-reactive -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-reactive --additional-properties reactive=true,delegatePattern=true,hideGenerationTimestamp=true $@" - -echo "Removing files and folders under samples/server/petstore/springboot-reactive/src/main" -rm -rf samples/server/petstore/springboot-reactive/src/main -find samples/server/petstore/springboot-reactive -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/springboot-petstore-server-useOptional.json b/bin/springboot-petstore-server-useOptional.json deleted file mode 100644 index 5a0c80d6b9..0000000000 --- a/bin/springboot-petstore-server-useOptional.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "artifactId": "spring-boot-useoptional", - "useOptional": true -} diff --git a/bin/springboot-petstore-server-useOptional.sh b/bin/springboot-petstore-server-useOptional.sh deleted file mode 100755 index 029f923862..0000000000 --- a/bin/springboot-petstore-server-useOptional.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -c bin/springboot-petstore-server-useOptional.json -o samples/server/petstore/springboot-useoptional --additional-properties hideGenerationTimestamp=true $@" - -echo "Removing files and folders under samples/server/petstore/springboot-useoptional/src/main" -rm -rf samples/server/petstore/springboot-useoptional/src/main -find samples/server/petstore/springboot-useoptional -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/springboot-petstore-server.sh b/bin/springboot-petstore-server.sh deleted file mode 100755 index b1f408e5f3..0000000000 --- a/bin/springboot-petstore-server.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id springboot -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot --additional-properties hideGenerationTimestamp=true,snapshotVersion=true $@" - -echo "Removing files and folders under samples/server/petstore/springboot/src/main" -rm -rf samples/server/petstore/springboot/src/main -find samples/server/petstore/springboot -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/springboot-virtualan-petstore-server.json b/bin/springboot-virtualan-petstore-server.json deleted file mode 100644 index d02799fde6..0000000000 --- a/bin/springboot-virtualan-petstore-server.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "artifactId": "springboot-virtualan", - "library": "spring-boot", - "virtualService": true, - "modelPackage" : "org.openapitools.virtualan.model", - "apiPackage" : "org.openapitools.virtualan.api" -} diff --git a/bin/springboot-virtualan-petstore-server.sh b/bin/springboot-virtualan-petstore-server.sh deleted file mode 100755 index a8471cf199..0000000000 --- a/bin/springboot-virtualan-petstore-server.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate --artifact-id springboot-virtualan -t modules/openapi-generator/src/main/resources/JavaSpring -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g spring -o samples/server/petstore/springboot-virtualan -c bin/springboot-virtualan-petstore-server.json --additional-properties hideGenerationTimestamp=true $@" - -echo "Removing files and folders under samples/server/petstore/springboot-virtualan/src/main" -rm -rf samples/server/petstore/springboot-virtualan/src/main -find samples/server/petstore/springboot-virtualan -maxdepth 1 -type f ! -name "README.md" -exec rm {} + -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/supportPython2.json b/bin/supportPython2.json deleted file mode 100644 index 8fc7eca95e..0000000000 --- a/bin/supportPython2.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "supportPython2": true -} diff --git a/bin/swift5-all.sh b/bin/swift5-all.sh deleted file mode 100755 index 0fabcabab4..0000000000 --- a/bin/swift5-all.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -./bin/swift5-petstore-all.sh -./bin/swift5-test.sh diff --git a/bin/swift5-petstore-alamofire.json b/bin/swift5-petstore-alamofire.json deleted file mode 100644 index f6cc7270be..0000000000 --- a/bin/swift5-petstore-alamofire.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "podSummary": "PetstoreClient", - "podHomepage": "https://github.com/openapitools/openapi-generator", - "podAuthors": "", - "projectName": "PetstoreClient", - "library": "alamofire" -} diff --git a/bin/swift5-petstore-alamofire.sh b/bin/swift5-petstore-alamofire.sh deleted file mode 100755 index 6c8ef2c5f8..0000000000 --- a/bin/swift5-petstore-alamofire.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/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-alamofire.json -o samples/client/petstore/swift5/alamofireLibrary --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/alamofireLibrary - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/alamofireLibrary - swiftlint autocorrect -fi \ No newline at end of file diff --git a/bin/swift5-petstore-all.sh b/bin/swift5-petstore-all.sh deleted file mode 100755 index c3f468af03..0000000000 --- a/bin/swift5-petstore-all.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -./bin/swift5-petstore.sh -./bin/swift5-petstore-promisekit.sh -./bin/swift5-petstore-result.sh -./bin/swift5-petstore-rxswift.sh -./bin/swift5-petstore-objcCompatible.sh -./bin/swift5-petstore-nonPublicApi.sh -./bin/swift5-petstore-urlsession.sh -./bin/swift5-petstore-alamofire.sh -./bin/swift5-petstore-combine.sh -./bin/swift5-petstore-readonlyProperties.sh -./bin/swift5-petstore-deprecated.sh diff --git a/bin/swift5-petstore-combine.json b/bin/swift5-petstore-combine.json deleted file mode 100644 index ef420f56e2..0000000000 --- a/bin/swift5-petstore-combine.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "podSummary": "PetstoreClient", - "podHomepage": "https://github.com/openapitools/openapi-generator", - "podAuthors": "", - "projectName": "PetstoreClient", - "responseAs": "Combine" -} diff --git a/bin/swift5-petstore-combine.sh b/bin/swift5-petstore-combine.sh deleted file mode 100755 index 71ca667a9a..0000000000 --- a/bin/swift5-petstore-combine.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/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-combine.json -o samples/client/petstore/swift5/combineLibrary --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/combineLibrary - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/combineLibrary - swiftlint autocorrect -fi \ No newline at end of file diff --git a/bin/swift5-petstore-deprecated.json b/bin/swift5-petstore-deprecated.json deleted file mode 100644 index 59bd94f43e..0000000000 --- a/bin/swift5-petstore-deprecated.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "podSummary": "PetstoreClient", - "podHomepage": "https://github.com/openapitools/openapi-generator", - "podAuthors": "", - "projectName": "PetstoreClient" -} diff --git a/bin/swift5-petstore-deprecated.sh b/bin/swift5-petstore-deprecated.sh deleted file mode 100755 index b26f1c430f..0000000000 --- a/bin/swift5-petstore-deprecated.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/swift5 -i modules/openapi-generator/src/test/resources/3_0/petstore-with-depreacted-fields.yaml -g swift5 -c ./bin/swift5-petstore-deprecated.json -o samples/client/petstore/swift5/deprecated --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/deprecated - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/deprecated - swiftlint autocorrect -fi \ No newline at end of file diff --git a/bin/swift5-petstore-nonPublicApi.json b/bin/swift5-petstore-nonPublicApi.json deleted file mode 100644 index f20305dec0..0000000000 --- a/bin/swift5-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/swift5-petstore-nonPublicApi.sh b/bin/swift5-petstore-nonPublicApi.sh deleted file mode 100755 index fc4035bfca..0000000000 --- a/bin/swift5-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/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-nonPublicApi.json -o samples/client/petstore/swift5/nonPublicApi --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/nonPublicApi - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/nonPublicApi - swiftlint autocorrect -fi \ No newline at end of file diff --git a/bin/swift5-petstore-objcCompatible.json b/bin/swift5-petstore-objcCompatible.json deleted file mode 100644 index c24c7abf69..0000000000 --- a/bin/swift5-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/swift5-petstore-objcCompatible.sh b/bin/swift5-petstore-objcCompatible.sh deleted file mode 100755 index 39d53ff8e6..0000000000 --- a/bin/swift5-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/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-objcCompatible.json -o samples/client/petstore/swift5/objcCompatible --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/objcCompatible - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/objcCompatible - swiftlint autocorrect -fi \ No newline at end of file diff --git a/bin/swift5-petstore-promisekit.json b/bin/swift5-petstore-promisekit.json deleted file mode 100644 index 48137f1f28..0000000000 --- a/bin/swift5-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/swift5-petstore-promisekit.sh b/bin/swift5-petstore-promisekit.sh deleted file mode 100755 index f864088e9b..0000000000 --- a/bin/swift5-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/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-promisekit.json -o samples/client/petstore/swift5/promisekitLibrary --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/promisekitLibrary - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/promisekitLibrary - swiftlint autocorrect -fi \ No newline at end of file diff --git a/bin/swift5-petstore-readOnlyProperties.sh b/bin/swift5-petstore-readOnlyProperties.sh deleted file mode 100755 index fe838af1d3..0000000000 --- a/bin/swift5-petstore-readOnlyProperties.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/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-readonlyProperties.json -o samples/client/petstore/swift5/readonlyProperties --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/readonlyProperties - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/readonlyProperties - swiftlint autocorrect -fi \ No newline at end of file diff --git a/bin/swift5-petstore-readonlyProperties.json b/bin/swift5-petstore-readonlyProperties.json deleted file mode 100644 index 3993a3c26a..0000000000 --- a/bin/swift5-petstore-readonlyProperties.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "podSummary": "PetstoreClient", - "podHomepage": "https://github.com/openapitools/openapi-generator", - "podAuthors": "", - "projectName": "PetstoreClient", - "readonlyProperties": true -} diff --git a/bin/swift5-petstore-result.json b/bin/swift5-petstore-result.json deleted file mode 100644 index 3154338678..0000000000 --- a/bin/swift5-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/swift5-petstore-result.sh b/bin/swift5-petstore-result.sh deleted file mode 100755 index 803c79a4f7..0000000000 --- a/bin/swift5-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/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-result.json -o samples/client/petstore/swift5/resultLibrary --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/resultLibrary - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/resultLibrary - swiftlint autocorrect -fi \ No newline at end of file diff --git a/bin/swift5-petstore-rxswift.json b/bin/swift5-petstore-rxswift.json deleted file mode 100644 index eb8b11dde5..0000000000 --- a/bin/swift5-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/swift5-petstore-rxswift.sh b/bin/swift5-petstore-rxswift.sh deleted file mode 100755 index 9c8398248e..0000000000 --- a/bin/swift5-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/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-rxswift.json -o samples/client/petstore/swift5/rxswiftLibrary --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/rxswiftLibrary - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/rxswiftLibrary - swiftlint autocorrect -fi \ No newline at end of file diff --git a/bin/swift5-petstore-urlsession.json b/bin/swift5-petstore-urlsession.json deleted file mode 100644 index db0f6c9fbf..0000000000 --- a/bin/swift5-petstore-urlsession.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "podSummary": "PetstoreClient", - "podHomepage": "https://github.com/openapitools/openapi-generator", - "podAuthors": "", - "projectName": "PetstoreClient", - "library": "urlsession" -} diff --git a/bin/swift5-petstore-urlsession.sh b/bin/swift5-petstore-urlsession.sh deleted file mode 100755 index 76a674d431..0000000000 --- a/bin/swift5-petstore-urlsession.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/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore-urlsession.json -o samples/client/petstore/swift5/urlsessionLibrary --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/urlsessionLibrary - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/urlsessionLibrary - swiftlint autocorrect -fi \ No newline at end of file diff --git a/bin/swift5-petstore.json b/bin/swift5-petstore.json deleted file mode 100644 index 59bd94f43e..0000000000 --- a/bin/swift5-petstore.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "podSummary": "PetstoreClient", - "podHomepage": "https://github.com/openapitools/openapi-generator", - "podAuthors": "", - "projectName": "PetstoreClient" -} diff --git a/bin/swift5-petstore.sh b/bin/swift5-petstore.sh deleted file mode 100755 index f2752acc1a..0000000000 --- a/bin/swift5-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/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift/petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c ./bin/swift5-petstore.json -o samples/client/petstore/swift5/default --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/default - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/petstore/swift5/default - swiftlint autocorrect -fi diff --git a/bin/swift5-test.json b/bin/swift5-test.json deleted file mode 100644 index 9341b740a2..0000000000 --- a/bin/swift5-test.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "podSummary": "TestClient", - "podHomepage": "https://github.com/openapitools/openapi-generator", - "podAuthors": "", - "projectName": "TestClient" -} diff --git a/bin/swift5-test.sh b/bin/swift5-test.sh deleted file mode 100755 index 1620ea6e27..0000000000 --- a/bin/swift5-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/swift5 -i modules/openapi-generator/src/test/resources/2_0/swift5Test.json -g swift5 -c ./bin/swift5-test.json -o samples/client/test/swift5/default --generate-alias-as-model $@" - -java $JAVA_OPTS -jar $executable $ags - -if type "xcodegen" > /dev/null 2>&1; then - cd samples/client/test/swift5/default - xcodegen generate -fi - -if type "swiftlint" > /dev/null 2>&1; then - cd samples/client/test/swift5/default - swiftlint autocorrect -fi diff --git a/bin/typescript-angular-petstore-all.sh b/bin/typescript-angular-petstore-all.sh deleted file mode 100755 index 55ed856f34..0000000000 --- a/bin/typescript-angular-petstore-all.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -./bin/typescript-angular-v6-petstore-not-provided-in-root.sh -./bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.sh -./bin/typescript-angular-v6-petstore-provided-in-root.sh -./bin/typescript-angular-v6-petstore-provided-in-root-with-npm.sh -./bin/typescript-angular-v7-petstore-not-provided-in-root.sh -./bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.sh -./bin/typescript-angular-v7-petstore-provided-in-root.sh -./bin/typescript-angular-v7-petstore-provided-in-root-with-npm.sh -./bin/typescript-angular-v8-petstore-provided-in-root-with-npm.sh -./bin/typescript-angular-v8-petstore-provided-in-root-with-prefixed-module-name.sh -./bin/typescript-angular-v8-petstore-single-request-parameter.sh diff --git a/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.json b/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.json deleted file mode 100644 index 535bffbd45..0000000000 --- a/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "npmName": "@openapitools/typescript-angular-petstore", - "npmVersion": "1.0.0", - "npmRepository" : "https://skimdb.npmjs.com/registry", - "snapshot" : false -} diff --git a/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.sh b/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.sh deleted file mode 100755 index 981e55dbc2..0000000000 --- a/bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-angular-v6-petstore-not-provided-in-root-with-npm.json -o samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm --additional-properties ngVersion=6.0.0,providedInRoot=false $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-v6-petstore-not-provided-in-root.sh b/bin/typescript-angular-v6-petstore-not-provided-in-root.sh deleted file mode 100755 index f00826e050..0000000000 --- a/bin/typescript-angular-v6-petstore-not-provided-in-root.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default --additional-properties ngVersion=6.0.0,providedInRoot=false $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-v6-petstore-provided-in-root-with-npm.json b/bin/typescript-angular-v6-petstore-provided-in-root-with-npm.json deleted file mode 100644 index 535bffbd45..0000000000 --- a/bin/typescript-angular-v6-petstore-provided-in-root-with-npm.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "npmName": "@openapitools/typescript-angular-petstore", - "npmVersion": "1.0.0", - "npmRepository" : "https://skimdb.npmjs.com/registry", - "snapshot" : false -} diff --git a/bin/typescript-angular-v6-petstore-provided-in-root-with-npm.sh b/bin/typescript-angular-v6-petstore-provided-in-root-with-npm.sh deleted file mode 100755 index e1da8eba28..0000000000 --- a/bin/typescript-angular-v6-petstore-provided-in-root-with-npm.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-angular-v6-petstore-provided-in-root-with-npm.json -o samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm --additional-properties ngVersion=6.0.0 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-v6-petstore-provided-in-root.sh b/bin/typescript-angular-v6-petstore-provided-in-root.sh deleted file mode 100755 index 7ef2f72152..0000000000 --- a/bin/typescript-angular-v6-petstore-provided-in-root.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default --additional-properties ngVersion=6.0.0 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.json b/bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.json deleted file mode 100644 index 9c939c67ae..0000000000 --- a/bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "npmName": "@openapitools/typescript-angular-petstore", - "npmVersion": "1.0.0", - "stringEnums": true, - "npmRepository": "https://skimdb.npmjs.com/registry", - "snapshot": false -} diff --git a/bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.sh b/bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.sh deleted file mode 100755 index f74cb16b02..0000000000 --- a/bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-angular-v7-petstore-not-provided-in-root-with-npm.json -o samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm --additional-properties ngVersion=7.0.0,providedInRoot=false $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-v7-petstore-not-provided-in-root.sh b/bin/typescript-angular-v7-petstore-not-provided-in-root.sh deleted file mode 100755 index 46eb22cbc4..0000000000 --- a/bin/typescript-angular-v7-petstore-not-provided-in-root.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default --additional-properties ngVersion=7.0.0,providedInRoot=false $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-v7-petstore-provided-in-root-with-npm.json b/bin/typescript-angular-v7-petstore-provided-in-root-with-npm.json deleted file mode 100644 index 535bffbd45..0000000000 --- a/bin/typescript-angular-v7-petstore-provided-in-root-with-npm.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "npmName": "@openapitools/typescript-angular-petstore", - "npmVersion": "1.0.0", - "npmRepository" : "https://skimdb.npmjs.com/registry", - "snapshot" : false -} diff --git a/bin/typescript-angular-v7-petstore-provided-in-root-with-npm.sh b/bin/typescript-angular-v7-petstore-provided-in-root-with-npm.sh deleted file mode 100755 index 5d9f0d738e..0000000000 --- a/bin/typescript-angular-v7-petstore-provided-in-root-with-npm.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-angular-v7-petstore-provided-in-root-with-npm.json -o samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm --additional-properties ngVersion=7.0.0 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-v7-petstore-provided-in-root.sh b/bin/typescript-angular-v7-petstore-provided-in-root.sh deleted file mode 100755 index 222f35fd98..0000000000 --- a/bin/typescript-angular-v7-petstore-provided-in-root.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -o samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default --additional-properties ngVersion=7.0.0 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-v8-petstore-provided-in-root-with-npm.json b/bin/typescript-angular-v8-petstore-provided-in-root-with-npm.json deleted file mode 100644 index 11141667cf..0000000000 --- a/bin/typescript-angular-v8-petstore-provided-in-root-with-npm.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "npmName": "@openapitools/typescript-angular-petstore", - "npmVersion": "1.0.0", - "npmRepository" : "https://skimdb.npmjs.com/registry", - "snapshot" : false, - "ngVersion": "8.0.0" -} diff --git a/bin/typescript-angular-v8-petstore-provided-in-root-with-npm.sh b/bin/typescript-angular-v8-petstore-provided-in-root-with-npm.sh deleted file mode 100755 index c34db65d2d..0000000000 --- a/bin/typescript-angular-v8-petstore-provided-in-root-with-npm.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-angular-v8-petstore-provided-in-root-with-npm.json -o samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm --additional-properties ngVersion=8.0.0 $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-v8-petstore-provided-in-root-with-prefixed-module-name.sh b/bin/typescript-angular-v8-petstore-provided-in-root-with-prefixed-module-name.sh deleted file mode 100755 index 993a143da6..0000000000 --- a/bin/typescript-angular-v8-petstore-provided-in-root-with-prefixed-module-name.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-angular-v8-petstore-provided-in-root-with-npm.json -o samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name --additional-properties ngVersion=8.0.0,apiModulePrefix=PetStore $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angular-v8-petstore-single-request-parameter.sh b/bin/typescript-angular-v8-petstore-single-request-parameter.sh deleted file mode 100755 index 9f25d467d2..0000000000 --- a/bin/typescript-angular-v8-petstore-single-request-parameter.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angular -c bin/typescript-angular-v8-petstore-provided-in-root-with-npm.json -o samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter --additional-properties ngVersion=8.0.0,useSingleRequestParameter=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-angularjs-petstore.sh b/bin/typescript-angularjs-petstore.sh deleted file mode 100755 index 72c8aac266..0000000000 --- a/bin/typescript-angularjs-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-angularjs -o samples/client/petstore/typescript-angularjs $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-aurelia-petstore.sh b/bin/typescript-aurelia-petstore.sh deleted file mode 100755 index a9f40e6f76..0000000000 --- a/bin/typescript-aurelia-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-aurelia -o samples/client/petstore/typescript-aurelia/default $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-axios-petstore-all.sh b/bin/typescript-axios-petstore-all.sh deleted file mode 100755 index c66b3eba30..0000000000 --- a/bin/typescript-axios-petstore-all.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -./bin/typescript-axios-petstore-target-es6.sh -./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-composed-schemas.sh -./bin/typescript-axios-petstore.sh diff --git a/bin/typescript-axios-petstore-composed-schemas.sh b/bin/typescript-axios-petstore-composed-schemas.sh deleted file mode 100755 index 8ed378b6f3..0000000000 --- a/bin/typescript-axios-petstore-composed-schemas.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/composed-schemas.yaml -g typescript-axios -o samples/client/petstore/typescript-axios/builds/composed-schemas $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-axios-petstore-interfaces.sh b/bin/typescript-axios-petstore-interfaces.sh deleted file mode 100755 index 84a65e0aba..0000000000 --- a/bin/typescript-axios-petstore-interfaces.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-axios -o samples/client/petstore/typescript-axios/builds/with-interfaces --additional-properties withInterfaces=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-axios-petstore-target-es6.json b/bin/typescript-axios-petstore-target-es6.json deleted file mode 100755 index 9d429900bf..0000000000 --- a/bin/typescript-axios-petstore-target-es6.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "npmName": "@openapitools/typescript-axios-petstore", - "npmVersion": "1.0.0", - "npmRepository": "https://skimdb.npmjs.com/registry", - "snapshot": false, - "supportsES6": true -} diff --git a/bin/typescript-axios-petstore-target-es6.sh b/bin/typescript-axios-petstore-target-es6.sh deleted file mode 100755 index fc5ec66aea..0000000000 --- a/bin/typescript-axios-petstore-target-es6.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-axios -c bin/typescript-axios-petstore-target-es6.json -o samples/client/petstore/typescript-axios/builds/es6-target $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-axios-petstore-with-complex-headers.sh b/bin/typescript-axios-petstore-with-complex-headers.sh deleted file mode 100755 index 385f9684c1..0000000000 --- a/bin/typescript-axios-petstore-with-complex-headers.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/3_0/petstore-with-complex-headers.yaml -g typescript-axios -o samples/client/petstore/typescript-axios/builds/with-complex-headers $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-axios-petstore-with-npm-version-and-separate-models-and-api.json b/bin/typescript-axios-petstore-with-npm-version-and-separate-models-and-api.json deleted file mode 100755 index db558308ab..0000000000 --- a/bin/typescript-axios-petstore-with-npm-version-and-separate-models-and-api.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "npmName": "@openapitools/typescript-axios-petstore", - "npmVersion": "1.0.0", - "npmRepository": "https://skimdb.npmjs.com/registry", - "snapshot": false, - "withSeparateModelsAndApi": true, - "modelPackage": "model.some.levels.deep", - "apiPackage": "api.another.level" -} diff --git a/bin/typescript-axios-petstore-with-npm-version-and-separate-models-and-api.sh b/bin/typescript-axios-petstore-with-npm-version-and-separate-models-and-api.sh deleted file mode 100755 index 12337bf743..0000000000 --- a/bin/typescript-axios-petstore-with-npm-version-and-separate-models-and-api.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-axios -c bin/typescript-axios-petstore-with-npm-version-and-separate-models-and-api.json -o samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-axios-petstore-with-npm-version.json b/bin/typescript-axios-petstore-with-npm-version.json deleted file mode 100755 index f3ad549bee..0000000000 --- a/bin/typescript-axios-petstore-with-npm-version.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "npmName": "@openapitools/typescript-axios-petstore", - "npmVersion": "1.0.0", - "npmRepository": "https://skimdb.npmjs.com/registry", - "snapshot": false -} diff --git a/bin/typescript-axios-petstore-with-npm-version.sh b/bin/typescript-axios-petstore-with-npm-version.sh deleted file mode 100755 index c836c3159f..0000000000 --- a/bin/typescript-axios-petstore-with-npm-version.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-axios -c bin/typescript-axios-petstore-with-npm-version.json -o samples/client/petstore/typescript-axios/builds/with-npm-version $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-axios-petstore-with-single-request-parameters.sh b/bin/typescript-axios-petstore-with-single-request-parameters.sh deleted file mode 100755 index 25a7a60ce2..0000000000 --- a/bin/typescript-axios-petstore-with-single-request-parameters.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-operations-without-required-params.yaml -g typescript-axios -o samples/client/petstore/typescript-axios/builds/with-single-request-parameters --additional-properties useSingleRequestParameter=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-axios-petstore.sh b/bin/typescript-axios-petstore.sh deleted file mode 100755 index 10071fb50c..0000000000 --- a/bin/typescript-axios-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-axios -o samples/client/petstore/typescript-axios/builds/default $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-fetch-petstore-all.sh b/bin/typescript-fetch-petstore-all.sh deleted file mode 100755 index 7258b830a7..0000000000 --- a/bin/typescript-fetch-petstore-all.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -./bin/typescript-fetch-petstore-target-es6.sh -./bin/typescript-fetch-petstore-with-npm-version.sh -./bin/typescript-fetch-petstore-interfaces.sh -./bin/typescript-fetch-petstore.sh -./bin/typescript-fetch-petstore-multiple-parameters.sh -./bin/typescript-fetch-petstore-prefix-parameter-interfaces.sh -./bin/typescript-fetch-petstore-typescript-three-plus.sh diff --git a/bin/typescript-fetch-petstore-interfaces.sh b/bin/typescript-fetch-petstore-interfaces.sh deleted file mode 100755 index 412d778b4f..0000000000 --- a/bin/typescript-fetch-petstore-interfaces.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-fetch -o samples/client/petstore/typescript-fetch/builds/with-interfaces --additional-properties withInterfaces=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-fetch-petstore-multiple-parameters.json b/bin/typescript-fetch-petstore-multiple-parameters.json deleted file mode 100644 index c165a82a50..0000000000 --- a/bin/typescript-fetch-petstore-multiple-parameters.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "snapshot" : false, - "useSingleRequestParameter": false -} \ No newline at end of file diff --git a/bin/typescript-fetch-petstore-multiple-parameters.sh b/bin/typescript-fetch-petstore-multiple-parameters.sh deleted file mode 100755 index 6dfa018ef3..0000000000 --- a/bin/typescript-fetch-petstore-multiple-parameters.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-fetch -c bin/typescript-fetch-petstore-multiple-parameters.json -o samples/client/petstore/typescript-fetch/builds/multiple-parameters $@" - -java $JAVA_OPTS -jar $executable $ags -cp CI/samples.ci/client/petstore/typescript-fetch/builds/multiple-parameters/pom.xml samples/client/petstore/typescript-fetch/builds/multiple-parameters/pom.xml -cp CI/samples.ci/client/petstore/typescript-fetch/tests/default/pom.xml samples/client/petstore/typescript-fetch/tests/default/pom.xml \ No newline at end of file diff --git a/bin/typescript-fetch-petstore-prefix-parameter-interfaces.json b/bin/typescript-fetch-petstore-prefix-parameter-interfaces.json deleted file mode 100644 index 5694785550..0000000000 --- a/bin/typescript-fetch-petstore-prefix-parameter-interfaces.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "npmName": "@openapitools/typescript-fetch-petstore", - "npmVersion": "1.0.0", - "npmRepository" : "https://skimdb.npmjs.com/registry", - "snapshot" : false, - "prefixParameterInterfaces": true -} diff --git a/bin/typescript-fetch-petstore-prefix-parameter-interfaces.sh b/bin/typescript-fetch-petstore-prefix-parameter-interfaces.sh deleted file mode 100755 index 9ba84b2cc4..0000000000 --- a/bin/typescript-fetch-petstore-prefix-parameter-interfaces.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-fetch -c bin/typescript-fetch-petstore-prefix-parameter-interfaces.json -o samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces $@" - -java $JAVA_OPTS -jar $executable $ags - -cp CI/samples.ci/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/pom.xml samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/pom.xml diff --git a/bin/typescript-fetch-petstore-target-es6.json b/bin/typescript-fetch-petstore-target-es6.json deleted file mode 100644 index 4eefe39000..0000000000 --- a/bin/typescript-fetch-petstore-target-es6.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "npmName": "@openapitools/typescript-fetch-petstore", - "npmVersion": "1.0.0", - "npmRepository" : "https://skimdb.npmjs.com/registry", - "snapshot" : false, - "supportsES6": true -} diff --git a/bin/typescript-fetch-petstore-target-es6.sh b/bin/typescript-fetch-petstore-target-es6.sh deleted file mode 100755 index 9edd6f2e25..0000000000 --- a/bin/typescript-fetch-petstore-target-es6.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-fetch -c bin/typescript-fetch-petstore-target-es6.json -o samples/client/petstore/typescript-fetch/builds/es6-target $@" - -java $JAVA_OPTS -jar $executable $ags -cp CI/samples.ci/client/petstore/typescript-fetch/builds/es6-target/pom.xml samples/client/petstore/typescript-fetch/builds/es6-target/pom.xml -cp CI/samples.ci/client/petstore/typescript-fetch/tests/default/pom.xml samples/client/petstore/typescript-fetch/tests/default/pom.xml \ No newline at end of file diff --git a/bin/typescript-fetch-petstore-typescript-three-plus.json b/bin/typescript-fetch-petstore-typescript-three-plus.json deleted file mode 100644 index b8952aa6e8..0000000000 --- a/bin/typescript-fetch-petstore-typescript-three-plus.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "npmName": "@openapitools/typescript-fetch-petstore", - "npmVersion": "1.0.0", - "npmRepository" : "https://skimdb.npmjs.com/registry", - "snapshot" : false, - "typescriptThreePlus": true -} diff --git a/bin/typescript-fetch-petstore-typescript-three-plus.sh b/bin/typescript-fetch-petstore-typescript-three-plus.sh deleted file mode 100755 index 91776dd94f..0000000000 --- a/bin/typescript-fetch-petstore-typescript-three-plus.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-fetch -c bin/typescript-fetch-petstore-typescript-three-plus.json -o samples/client/petstore/typescript-fetch/builds/typescript-three-plus $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-fetch-petstore-with-npm-version.json b/bin/typescript-fetch-petstore-with-npm-version.json deleted file mode 100644 index 1e64bb7ff3..0000000000 --- a/bin/typescript-fetch-petstore-with-npm-version.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "npmName": "@openapitools/typescript-fetch-petstore", - "npmVersion": "1.0.0", - "npmRepository" : "https://skimdb.npmjs.com/registry", - "snapshot" : false -} diff --git a/bin/typescript-fetch-petstore-with-npm-version.sh b/bin/typescript-fetch-petstore-with-npm-version.sh deleted file mode 100755 index 16d60e5f46..0000000000 --- a/bin/typescript-fetch-petstore-with-npm-version.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-fetch -c bin/typescript-fetch-petstore-with-npm-version.json -o samples/client/petstore/typescript-fetch/builds/with-npm-version $@" - -java $JAVA_OPTS -jar $executable $ags -cp CI/samples.ci/client/petstore/typescript-fetch/builds/with-npm-version/pom.xml samples/client/petstore/typescript-fetch/builds/with-npm-version/pom.xml -cp CI/samples.ci/client/petstore/typescript-fetch/tests/default/pom.xml samples/client/petstore/typescript-fetch/tests/default/pom.xml \ No newline at end of file diff --git a/bin/typescript-fetch-petstore.sh b/bin/typescript-fetch-petstore.sh deleted file mode 100755 index 2b3f34a20f..0000000000 --- a/bin/typescript-fetch-petstore.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-fetch -o samples/client/petstore/typescript-fetch/builds/default $@" - -java $JAVA_OPTS -jar $executable $ags -cp CI/samples.ci/client/petstore/typescript-fetch/builds/default/pom.xml samples/client/petstore/typescript-fetch/builds/default/pom.xml -cp CI/samples.ci/client/petstore/typescript-fetch/tests/default/pom.xml samples/client/petstore/typescript-fetch/tests/default/pom.xml \ No newline at end of file diff --git a/bin/typescript-inversify-petstore.sh b/bin/typescript-inversify-petstore.sh deleted file mode 100755 index f79dbaf0de..0000000000 --- a/bin/typescript-inversify-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-inversify -o samples/client/petstore/typescript-inversify $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-jquery-petstore-all.sh b/bin/typescript-jquery-petstore-all.sh deleted file mode 100755 index 16b8a70dd3..0000000000 --- a/bin/typescript-jquery-petstore-all.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -./bin/typescript-jquery-petstore.sh -./bin/typescript-jquery-petstore-with-npm.sh diff --git a/bin/typescript-jquery-petstore-npm.json b/bin/typescript-jquery-petstore-npm.json deleted file mode 100644 index 846a80ad47..0000000000 --- a/bin/typescript-jquery-petstore-npm.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "npmName": "@openapitools/jquery-typescript-petstore", - "npmVersion": "0.0.1", - "npmRepository" : "https://skimdb.npmjs.com/registry", - "snapshot" : false -} diff --git a/bin/typescript-jquery-petstore-with-npm.sh b/bin/typescript-jquery-petstore-with-npm.sh deleted file mode 100755 index 0bb443c6ee..0000000000 --- a/bin/typescript-jquery-petstore-with-npm.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-jquery -c bin/typescript-jquery-petstore-npm.json -o samples/client/petstore/typescript-jquery/npm $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-jquery-petstore.sh b/bin/typescript-jquery-petstore.sh deleted file mode 100755 index d45e06275a..0000000000 --- a/bin/typescript-jquery-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-jquery -o samples/client/petstore/typescript-jquery/default $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-node-petstore-all.sh b/bin/typescript-node-petstore-all.sh deleted file mode 100755 index 08ba781a00..0000000000 --- a/bin/typescript-node-petstore-all.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -./bin/typescript-node-petstore-with-npm.sh -./bin/typescript-node-petstore.sh diff --git a/bin/typescript-node-petstore-npm.json b/bin/typescript-node-petstore-npm.json deleted file mode 100644 index 773813fb41..0000000000 --- a/bin/typescript-node-petstore-npm.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "npmName": "@openapitools/node-typescript-petstore", - "npmVersion": "0.0.1", - "npmRepository": "https://skimdb.npmjs.com/registry", - "snapshot": false -} diff --git a/bin/typescript-node-petstore-with-npm.sh b/bin/typescript-node-petstore-with-npm.sh deleted file mode 100755 index c494752f5e..0000000000 --- a/bin/typescript-node-petstore-with-npm.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-node -c bin/typescript-node-petstore-npm.json -o samples/client/petstore/typescript-node/npm $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-node-petstore.sh b/bin/typescript-node-petstore.sh deleted file mode 100755 index 4554636e48..0000000000 --- a/bin/typescript-node-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-node -o samples/client/petstore/typescript-node/default $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-petstore-npm.json b/bin/typescript-petstore-npm.json deleted file mode 100644 index 2f5bf810ec..0000000000 --- a/bin/typescript-petstore-npm.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "npmName": "@openapitools/angular2-typescript-petstore", - "npmVersion": "0.0.1", - "npmRepository" : "https://skimdb.npmjs.com/registry", - "snapshot" : false -} diff --git a/bin/typescript-redux-query-petstore-with-npm-version.json b/bin/typescript-redux-query-petstore-with-npm-version.json deleted file mode 100644 index fd8e859f35..0000000000 --- a/bin/typescript-redux-query-petstore-with-npm-version.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "npmName": "@openapitools/typescript-redux-query-petstore", - "npmVersion": "1.0.0", - "npmRepository" : "https://skimdb.npmjs.com/registry", - "snapshot" : false -} diff --git a/bin/typescript-redux-query-petstore-with-npm-version.sh b/bin/typescript-redux-query-petstore-with-npm-version.sh deleted file mode 100755 index 262e4b69c1..0000000000 --- a/bin/typescript-redux-query-petstore-with-npm-version.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/typescript-redux-query -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-redux-query -c bin/typescript-redux-query-petstore-with-npm-version.json -o samples/client/petstore/typescript-redux-query/builds/with-npm-version $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-redux-query-petstore.sh b/bin/typescript-redux-query-petstore.sh deleted file mode 100755 index 4b8d347849..0000000000 --- a/bin/typescript-redux-query-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -t modules/openapi-generator/src/main/resources/typescript-redux-query -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-redux-query -o samples/client/petstore/typescript-redux-query/builds/default $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-rxjs-petstore-all.sh b/bin/typescript-rxjs-petstore-all.sh deleted file mode 100755 index 2391a66637..0000000000 --- a/bin/typescript-rxjs-petstore-all.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -./bin/typescript-rxjs-petstore-target-es6.sh -./bin/typescript-rxjs-petstore-with-npm-version.sh -./bin/typescript-rxjs-petstore-interfaces.sh -./bin/typescript-rxjs-petstore.sh diff --git a/bin/typescript-rxjs-petstore-interfaces.sh b/bin/typescript-rxjs-petstore-interfaces.sh deleted file mode 100755 index c7b52aca52..0000000000 --- a/bin/typescript-rxjs-petstore-interfaces.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-rxjs -o samples/client/petstore/typescript-rxjs/builds/with-interfaces --additional-properties withInterfaces=true $@" - -java $JAVA_OPTS -jar $executable $ags diff --git a/bin/typescript-rxjs-petstore-target-es6.json b/bin/typescript-rxjs-petstore-target-es6.json deleted file mode 100644 index f9537dc8c5..0000000000 --- a/bin/typescript-rxjs-petstore-target-es6.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "npmName": "@openapitools/typescript-rxjs-petstore", - "npmVersion": "1.0.0", - "npmRepository" : "https://skimdb.npmjs.com/registry", - "snapshot" : false, - "supportsES6": true -} diff --git a/bin/typescript-rxjs-petstore-target-es6.sh b/bin/typescript-rxjs-petstore-target-es6.sh deleted file mode 100755 index 1a5f9e1b00..0000000000 --- a/bin/typescript-rxjs-petstore-target-es6.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-rxjs -c bin/typescript-rxjs-petstore-target-es6.json -o samples/client/petstore/typescript-rxjs/builds/es6-target $@" - -java $JAVA_OPTS -jar $executable $ags \ No newline at end of file diff --git a/bin/typescript-rxjs-petstore-with-npm-version.json b/bin/typescript-rxjs-petstore-with-npm-version.json deleted file mode 100644 index 08ff54292b..0000000000 --- a/bin/typescript-rxjs-petstore-with-npm-version.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "npmName": "@openapitools/typescript-rxjs-petstore", - "npmVersion": "1.0.0", - "npmRepository" : "https://skimdb.npmjs.com/registry", - "snapshot" : false -} diff --git a/bin/typescript-rxjs-petstore-with-npm-version.sh b/bin/typescript-rxjs-petstore-with-npm-version.sh deleted file mode 100755 index 1026bbcf65..0000000000 --- a/bin/typescript-rxjs-petstore-with-npm-version.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-rxjs -c bin/typescript-rxjs-petstore-with-npm-version.json -o samples/client/petstore/typescript-rxjs/builds/with-npm-version $@" - -java $JAVA_OPTS -jar $executable $ags \ No newline at end of file diff --git a/bin/typescript-rxjs-petstore.sh b/bin/typescript-rxjs-petstore.sh deleted file mode 100755 index f0e7865d65..0000000000 --- a/bin/typescript-rxjs-petstore.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -SCRIPT="$0" -echo "# START SCRIPT: $SCRIPT" - -while [ -h "$SCRIPT" ] ; do - ls=`ls -ld "$SCRIPT"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - SCRIPT="$link" - else - SCRIPT=`dirname "$SCRIPT"`/"$link" - fi -done - -if [ ! -d "${APP_DIR}" ]; then - APP_DIR=`dirname "$SCRIPT"`/.. - APP_DIR=`cd "${APP_DIR}"; pwd` -fi - -executable="./modules/openapi-generator-cli/target/openapi-generator-cli.jar" - -if [ ! -f "$executable" ] -then - mvn -B clean package -fi - -# if you've executed sbt assembly previously it will use that instead. -export JAVA_OPTS="${JAVA_OPTS} -Xmx1024M -DloggerPath=conf/log4j.properties" -ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-rxjs -o samples/client/petstore/typescript-rxjs/builds/default $@" - -java $JAVA_OPTS -jar $executable $ags \ No newline at end of file diff --git a/bin/utils/ensure-up-to-date b/bin/utils/ensure-up-to-date index 3493cbbbf5..efe99bd76a 100755 --- a/bin/utils/ensure-up-to-date +++ b/bin/utils/ensure-up-to-date @@ -6,88 +6,21 @@ declare cwd="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" declare root="$(cd "$cwd" && cd ../../ && pwd)" declare executable="${root}/modules/openapi-generator-cli/target/openapi-generator-cli.jar" -declare batch_mode="false" echo "# START SCRIPT: $0" echo "IMPORTANT: this script should be run by the CI (e.g. Shippable) to ensure that the 'samples/' folder is up to date." -if [ "--batch" = "$1" ]; then - batch_mode="true" - echo "Running in 'batch mode' (single JVM, mutliple threads)." -else - echo "When running locally execute with argument --batch." -fi echo "Please press CTRL+C to stop or the script will continue in 5 seconds." sleep 5 -declare -a samples=( -"${root}/bin/ruby-client-petstore.sh" -"${root}/bin/ruby-client-petstore-faraday.sh" -"${root}/bin/java-petstore-all.sh" -"${root}/bin/java-jaxrs-petstore-server-all.sh" -"${root}/bin/java-msf4j-petstore-server.sh" -"${root}/bin/openapi3/jaxrs-jersey-petstore.sh" -"${root}/bin/spring-all-petstore.sh" -"${root}/bin/javascript-petstore-all.sh" -"${root}/bin/kotlin-client-all.sh" -"${root}/bin/kotlin-server-petstore.sh" -"${root}/bin/kotlin-springboot-petstore-server.sh" -"${root}/bin/kotlin-springboot-petstore-server-reactive.sh" -"${root}/bin/mysql-schema-petstore.sh" -"${root}/bin/nim-client-petstore.sh" -"${root}/bin/python-petstore-all.sh" -"${root}/bin/python-server-all.sh" -"${root}/bin/openapi3/python-petstore.sh" -"${root}/bin/openapi3/python-experimental-petstore.sh" -#"${root}/bin/openapi3/java-petstore-jersey2-java8.sh" -"${root}/bin/php-petstore.sh" -"${root}/bin/php-silex-petstore-server.sh" -"${root}/bin/php-symfony-petstore.sh" -"${root}/bin/php-lumen-petstore-server.sh" -"${root}/bin/php-slim-server-petstore.sh" -#"${root}/bin/php-slim4-server-petstore.sh" -"${root}/bin/php-ze-ph-petstore-server.sh" -"${root}/bin/openapi3/php-petstore.sh" -"${root}/bin/typescript-angularjs-petstore.sh" -"${root}/bin/typescript-angular-petstore-all.sh" -"${root}/bin/typescript-aurelia-petstore.sh" -"${root}/bin/typescript-axios-petstore-all.sh" -"${root}/bin/typescript-fetch-petstore-all.sh" -"${root}/bin/typescript-inversify-petstore.sh" -"${root}/bin/typescript-jquery-petstore-all.sh" -"${root}/bin/typescript-node-petstore-all.sh" -"${root}/bin/typescript-rxjs-petstore-all.sh" -"${root}/bin/rust-server-petstore.sh" -"${root}/bin/r-petstore.sh" -"${root}/bin/haskell-http-client-petstore.sh" -"${root}/bin/csharp-petstore.sh" -"${root}/bin/csharp-netcore-petstore-all.sh" -"${root}/bin/elixir-petstore.sh" -"${root}/bin/openapi3/go-petstore.sh" -"${root}/bin/openapi3/go-experimental-petstore.sh" -"${root}/bin/go-experimental-petstore.sh" -"${root}/bin/go-petstore.sh" -"${root}/bin/go-petstore-withxml.sh" -"${root}/bin/go-petstore-server.sh" -"${root}/bin/go-gin-petstore-server.sh" -"${root}/bin/groovy-petstore.sh" -"${root}/bin/apex-petstore.sh" -"${root}/bin/perl-petstore-all.sh" -"${root}/bin/dart-jaguar-petstore.sh" -#"${root}/bin/dart-dio-petstore.sh" -"${root}/bin/dart-petstore.sh" -"${root}/bin/dart2-petstore.sh" -"${root}/bin/java-play-framework-petstore-server-all.sh" -"${root}/bin/openapi3/elm.sh" -"${root}/bin/typescript-redux-query-petstore-with-npm-version.sh" -"${root}/bin/cpp-restsdk-petstore.sh" -"${root}/bin/cpp-qt5-qhttpengine-server-petstore.sh" -#"${root}/bin/openapi3/powershell-experimental-petstore.sh" -"${root}/bin/scala-akka-petstore.sh" -"${root}/bin/scala-sttp-petstore.sh" -"${root}/bin/lua-petstore.sh" -) +"${root}/bin/generate-samples.sh" + +status=$? +if [ $status -ne 0 ]; then + echo "ERROR: One or more generators failed to generate. Halting ensure-up-to-date scripts." >&2 + exit $status +fi # Some special case generators may expect to be run as a stanalone process (e.g. modifying classpath) # Docs should always be run, regardless of batch or operation. @@ -98,27 +31,9 @@ declare -a always_iterate=( "${root}/bin/utils/export_generators_readme.sh" ) -export JAVA_OPTS="${JAVA_OPTS} -Djava.awt.headless=true -Dorg.slf4j.simpleLogger.defaultLogLevel=warn" -if [ "true" = "$batch_mode" ]; then - if [ ! -f "$executable" ]; then - (cd "${root}" && mvn -B --no-snapshot-updates clean package -DskipTests=true -Dmaven.javadoc.skip=true) - fi - - # shellcheck disable=SC2086 - java $JAVA_OPTS -jar "$executable" batch --includes-base-dir "${root}" --fail-fast -- "${root}"/bin/ci/* -else - for script in "${samples[@]}"; do - if eval "$script" > /dev/null 2>&1; then - echo "Executed $script successfully!" - else - echo "ERROR: Failed to run $script" - exit 1 - fi - done -fi - for i in "${always_iterate[@]}"; do - if eval "$i" > /dev/null 2>&1; then + echo "Starting $i ..." + if eval "$i"; then echo "Executed $i successfully!" else echo "ERROR: Failed to run $i" diff --git a/bin/windows/android-petstore-all.bat b/bin/windows/android-petstore-all.bat deleted file mode 100755 index 65862f5f0b..0000000000 --- a/bin/windows/android-petstore-all.bat +++ /dev/null @@ -1,2 +0,0 @@ -call .\bin\windows\android-petstore-volley.bat -call .\bin\windows\android-petstore-httpclient.bat diff --git a/bin/windows/android-petstore-httpclient.bat b/bin/windows/android-petstore-httpclient.bat deleted file mode 100755 index 602d885e90..0000000000 --- a/bin/windows/android-petstore-httpclient.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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g android -o samples\client\petstore\android\httpclient --additional-properties library=httpclient - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/android-petstore-volley.bat b/bin/windows/android-petstore-volley.bat deleted file mode 100755 index c4d2e4ac98..0000000000 --- a/bin/windows/android-petstore-volley.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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g android -o samples\client\petstore\android\volley - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/android-petstore.bat b/bin/windows/android-petstore.bat deleted file mode 100755 index b2183d8459..0000000000 --- a/bin/windows/android-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g android -o samples\client\petstore\android\default - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/apache2-petstore-config.bat b/bin/windows/apache2-petstore-config.bat deleted file mode 100644 index 135ddabc57..0000000000 --- a/bin/windows/apache2-petstore-config.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 -DloggerPath=conf/log4j.properties -set ags=generate -t modules\openapi-generator\src\main\resources\apache2\ -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g apache2 -o samples\config\petstore\apache2\ - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/apex-petstore.bat b/bin/windows/apex-petstore.bat deleted file mode 100755 index fb23607cb8..0000000000 --- a/bin/windows/apex-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.yaml -g apex -o samples\client\petstore\apex - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/asciidoc-documentation-petstore.bat b/bin/windows/asciidoc-documentation-petstore.bat deleted file mode 100644 index 476fcb2bc9..0000000000 --- a/bin/windows/asciidoc-documentation-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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "asciidoc-petstore-documentation" -t modules\openapi-generator\src\main\resources\asciidoc-documentation --additional-properties=specDir=modules\openapi-generator\src\main\resources\asciidoc-documentation,snippetDir=. -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g asciidoc -o samples\documentation\asciidoc - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/aspnetcore-petstore-server.bat b/bin/windows/aspnetcore-petstore-server.bat deleted file mode 100755 index ee7f8b0f34..0000000000 --- a/bin/windows/aspnetcore-petstore-server.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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g aspnetcore -o samples\server\petstore\aspnetcore\ --additional-properties packageGuid={3C799344-F285-4669-8FD5-7ED9B795D5C5} - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/aspnetcore3-petstore-server.bat b/bin/windows/aspnetcore3-petstore-server.bat deleted file mode 100644 index 8e5e78ad40..0000000000 --- a/bin/windows/aspnetcore3-petstore-server.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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g aspnetcore -o samples\server\petstore\aspnetcore3\ --additional-properties packageGuid={3C799344-F285-4669-8FD5-7ED9B795D5C5} --additional-properties aspnetCoreVersion=3.0 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/c-petstore.bat b/bin/windows/c-petstore.bat deleted file mode 100755 index a3928e7c40..0000000000 --- a/bin/windows/c-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.yaml -g c -o samples\client\petstore\c - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/clojure-petstore.bat b/bin/windows/clojure-petstore.bat deleted file mode 100755 index bddf851b5f..0000000000 --- a/bin/windows/clojure-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.json -g clojure -o samples\client\petstore\clojure - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/cpp-pistache-server-petstore.bat b/bin/windows/cpp-pistache-server-petstore.bat deleted file mode 100644 index 3f9e53029b..0000000000 --- a/bin/windows/cpp-pistache-server-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g cpp-pistache-server -o samples\server\petstore\cpp-pistache\ - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/cpp-qt5-petstore.bat b/bin/windows/cpp-qt5-petstore.bat deleted file mode 100755 index eb49309ca8..0000000000 --- a/bin/windows/cpp-qt5-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.yaml -g cpp-qt5-client -o samples\client\petstore\cpp-qt5 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/cpp-qt5-qhttpengine-server-petstore.bat b/bin/windows/cpp-qt5-qhttpengine-server-petstore.bat deleted file mode 100644 index 3128febff6..0000000000 --- a/bin/windows/cpp-qt5-qhttpengine-server-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.yaml -g cpp-qt5-qhttpengine-server -o samples\server\petstore\cpp-qt5-qhttpengine-server - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/cpp-restbed-petstore-server.bat b/bin/windows/cpp-restbed-petstore-server.bat deleted file mode 100644 index e3a76db3f9..0000000000 --- a/bin/windows/cpp-restbed-petstore-server.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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g cpp-restbed-server -o samples\server\petstore\cpp-restbed\ - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/cpp-restsdk-petstore.bat b/bin/windows/cpp-restsdk-petstore.bat deleted file mode 100755 index 074bef9866..0000000000 --- a/bin/windows/cpp-restsdk-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g cpp-restsdk -o samples\client\petstore\cpp-restsdk\client - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/cpp-tizen-petstore.bat b/bin/windows/cpp-tizen-petstore.bat deleted file mode 100755 index 969f87e6b1..0000000000 --- a/bin/windows/cpp-tizen-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.yaml -g cpp-tizen -o samples\client\petstore\cpp-tizen - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/cpp-ue4-petstore.bat b/bin/windows/cpp-ue4-petstore.bat deleted file mode 100644 index 726c92dc1a..0000000000 --- a/bin/windows/cpp-ue4-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.yaml -g cpp-ue4 -o samples\client\petstore\cpp-ue4 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/csharp-dotnet2-petstore.bat b/bin/windows/csharp-dotnet2-petstore.bat deleted file mode 100755 index f5bc77332e..0000000000 --- a/bin/windows/csharp-dotnet2-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.yaml -g csharp-dotnet2 -t modules/openapi-generator/src/main/resources/csharp-dotnet2 -o samples/client/petstore/csharp-dotnet2/OpenApiClientTest/Lib/OpenApiClient --additional-properties hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/csharp-netcore-petstore-all.bat b/bin/windows/csharp-netcore-petstore-all.bat deleted file mode 100644 index 5396937baf..0000000000 --- a/bin/windows/csharp-netcore-petstore-all.bat +++ /dev/null @@ -1,7 +0,0 @@ - -REM C# Petstore API client .NET Standard 2.0 -call .\bin\windows\csharp-netcore-petstore.bat - -REM C# Petstore API client .NET Core 2.0 -call .\bin\windows\csharp-netcore-petstore-netcore.bat - diff --git a/bin/windows/csharp-netcore-petstore-netcore.bat b/bin/windows/csharp-netcore-petstore-netcore.bat deleted file mode 100644 index 9130c2d8e2..0000000000 --- a/bin/windows/csharp-netcore-petstore-netcore.bat +++ /dev/null @@ -1,15 +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 csharp-netcore -o samples\client\petstore\csharp-netcore\OpenAPIClientCore --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C},useCompareNetObjects=true,targetFramework=netcoreapp2.0 - -java %JAVA_OPTS% -jar %executable% %ags% - -REM restore csproj file -echo "restore csproject file: CI\samples.ci\client\petstore\csharp-netcore\OpenAPIClientCore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj" -copy /b/v/y CI\samples.ci\client\petstore\csharp-netcore\OpenAPIClientCore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj samples\client\petstore\csharp-netcore\OpenAPIClientCore\src\Org.OpenAPITools.Test\ - diff --git a/bin/windows/csharp-netcore-petstore.bat b/bin/windows/csharp-netcore-petstore.bat deleted file mode 100644 index b182ba3419..0000000000 --- a/bin/windows/csharp-netcore-petstore.bat +++ /dev/null @@ -1,15 +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 csharp-netcore -o samples\client\petstore\csharp-netcore\OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C},useCompareNetObjects=true - -java %JAVA_OPTS% -jar %executable% %ags% - -REM restore csproj file -echo "restore csproject file: CI\samples.ci\client\petstore\csharp-netcore\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj" -copy /b/v/y CI\samples.ci\client\petstore\csharp-netcore\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj samples\client\petstore\csharp-netcore\OpenAPIClient\src\Org.OpenAPITools.Test\ - diff --git a/bin/windows/csharp-petstore-all.bat b/bin/windows/csharp-petstore-all.bat deleted file mode 100755 index 46a7bc7916..0000000000 --- a/bin/windows/csharp-petstore-all.bat +++ /dev/null @@ -1,18 +0,0 @@ -REM C# Petstore API client -call .\bin\windows\csharp-petstore.bat - -REM C# Petstore API client with PropertyChanged -call .\bin\windows\csharp-property-changed-petstore.bat - -REM C# Petstore API client (.net standarnd 1.3+) -call .\bin\windows\csharp-petstore-netstandard.bat - -call .\bin\windows\csharp-dotnet2-petstore.bat - -call .\bin\windows\csharp-petstore-netcore-project.bat - -call .\bin\windows\csharp-property-changed-petstore.bat - -call .\bin\windows\csharp-petstore-net-40.bat - -call .\bin\windows\csharp-petstore-net-35.bat diff --git a/bin/windows/csharp-petstore-net-35.bat b/bin/windows/csharp-petstore-net-35.bat deleted file mode 100644 index 555ff79cc3..0000000000 --- a/bin/windows/csharp-petstore-net-35.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 csharp -o samples/client/petstore/csharp/OpenApiClientNet35 --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} -c ./bin/csharp-petstore-net-35.json - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/csharp-petstore-net-40.bat b/bin/windows/csharp-petstore-net-40.bat deleted file mode 100644 index 08f49c4c76..0000000000 --- a/bin/windows/csharp-petstore-net-40.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 csharp -o samples\client\petstore\csharp\OpenApiClientNet40 --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} -c .\bin\csharp-petstore-net-40.json - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/csharp-petstore-netcore-project.bat b/bin/windows/csharp-petstore-netcore-project.bat deleted file mode 100644 index b192df8735..0000000000 --- a/bin/windows/csharp-petstore-netcore-project.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 csharp -o samples\client\petstore\csharp\OpenApiClientNetCoreProject --additional-properties targetFramework=netstandard1.3,packageGuid={67035b31-f8e5-41a4-9673-954035084f7d},netCoreProjectFile=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/csharp-petstore-netstandard.bat b/bin/windows/csharp-petstore-netstandard.bat deleted file mode 100644 index 3b058f902b..0000000000 --- a/bin/windows/csharp-petstore-netstandard.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 csharp -o samples\client\petstore\csharp\OpenApiClientNetStandard --additional-properties targetFramework=netstandard1.3,packageGuid={3AB1F259-1769-484B-9411-84505FCCBD55} - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/csharp-petstore.bat b/bin/windows/csharp-petstore.bat deleted file mode 100755 index f231c5848c..0000000000 --- a/bin/windows/csharp-petstore.bat +++ /dev/null @@ -1,15 +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 csharp -o samples\client\petstore\csharp\OpenAPIClient --additional-properties packageGuid={321C8C3F-0156-40C1-AE42-D59761FB9B6C} - -java %JAVA_OPTS% -jar %executable% %ags% - -REM restore csproj file -echo "restore csproject file: CI\samples.ci\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj" -copy /b/v/y CI\samples.ci\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\ - diff --git a/bin/windows/csharp-property-changed-petstore.bat b/bin/windows/csharp-property-changed-petstore.bat deleted file mode 100644 index 48cdf749f0..0000000000 --- a/bin/windows/csharp-property-changed-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 csharp -o samples\client\petstore\csharp\OpenApiClientWithPropertyChanged --additional-properties=generatePropertyChanged=true,optionalEmitDefaultValues=true,packageGuid={5CD900DE-8266-412F-A758-28E1F9C623D5} - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/dart-client-petstore.bat b/bin/windows/dart-client-petstore.bat deleted file mode 100755 index c7a062603f..0000000000 --- a/bin/windows/dart-client-petstore.bat +++ /dev/null @@ -1,12 +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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart-jaguar -o samples\client\petstore\dart-jaguar\openapi --additional-properties hideGenerationTimestamp=true,browserClient=false -java %JAVA_OPTS% -jar %executable% %ags% - -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart-jaguar -o samples\client\petstore\dart-jaguar\flutter_petstore\openapi --additional-properties hideGenerationTimestamp=true -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/dart-dio-petstore.bat b/bin/windows/dart-dio-petstore.bat deleted file mode 100755 index 6905d65546..0000000000 --- a/bin/windows/dart-dio-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart-dio -o samples\client\petstore\dart-dio --additional-properties hideGenerationTimestamp=true -java %JAVA_OPTS% -jar %executable% %ags% - diff --git a/bin/windows/dart-petstore.bat b/bin/windows/dart-petstore.bat deleted file mode 100755 index bda54a2819..0000000000 --- a/bin/windows/dart-petstore.bat +++ /dev/null @@ -1,15 +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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart -o samples\client\petstore\dart\openapi --additional-properties hideGenerationTimestamp=true,browserClient=false -java %JAVA_OPTS% -jar %executable% %ags% - -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart -o samples\client\petstore\dart\openapi-browser-client --additional-properties hideGenerationTimestamp=true,browserClient=true -java %JAVA_OPTS% -jar %executable% %ags% - -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g dart -o samples\client\petstore\dart\flutter_petstore\openapi --additional-properties hideGenerationTimestamp=true,browserClient=false -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/dynamic-html-petstore.bat b/bin/windows/dynamic-html-petstore.bat deleted file mode 100755 index 885308fdb8..0000000000 --- a/bin/windows/dynamic-html-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g dynamic-html -o samples\client\petstore\dynamic-html - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/eiffel-petstore.bat b/bin/windows/eiffel-petstore.bat deleted file mode 100644 index 707ad13b3f..0000000000 --- a/bin/windows/eiffel-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g eiffel -o samples\client\petstore\eiffel - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/elm-petstore.bat b/bin/windows/elm-petstore.bat deleted file mode 100755 index d881f60bba..0000000000 --- a/bin/windows/elm-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.yaml -g elm -o samples\client\petstore\elm - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/erlang-petstore-client.bat b/bin/windows/erlang-petstore-client.bat deleted file mode 100755 index 88d0c61506..0000000000 --- a/bin/windows/erlang-petstore-client.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\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 deleted file mode 100755 index 9b53c9f606..0000000000 --- a/bin/windows/erlang-petstore-server.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\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/flash-petstore.bat b/bin/windows/flash-petstore.bat deleted file mode 100755 index 67b04a732e..0000000000 --- a/bin/windows/flash-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g flash -o samples\client\petstore\flash -c bin\flash-petstore.json - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/fsharp-functions-server-petstore.bat b/bin/windows/fsharp-functions-server-petstore.bat deleted file mode 100644 index 560697ffe1..0000000000 --- a/bin/windows/fsharp-functions-server-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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "fsharp-functions-petstore-server" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g fsharp-functions -o samples\server\petstore\fsharp-functions - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/fsharp-giraffe-server-petstore.bat b/bin/windows/fsharp-giraffe-server-petstore.bat deleted file mode 100644 index 98b516e11a..0000000000 --- a/bin/windows/fsharp-giraffe-server-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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "fsharp-giraffe-petstore-server" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g fsharp-giraffe-server -o samples\server\petstore\fsharp-giraffe - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/go-experimental-petstore.bat b/bin/windows/go-experimental-petstore.bat deleted file mode 100755 index d4c7d1c23a..0000000000 --- a/bin/windows/go-experimental-petstore.bat +++ /dev/null @@ -1,21 +0,0 @@ -setlocal - -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -set SPEC=modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -set GENERATOR=go-experimental -set STUB_DIR=samples\client\petstore\go-experimental\go-petstore - -echo Removing files and folders under %STUB_DIR% -del /F /S /Q %STUB_DIR% - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate -t modules\openapi-generator\src\main\resources\%GENERATOR% -i %SPEC% -g %GENERATOR% -o %STUB_DIR% --additional-properties packageName=petstore - -java %JAVA_OPTS% -jar %executable% %ags% - -endlocal diff --git a/bin/windows/go-gin-petstore-server.bat b/bin/windows/go-gin-petstore-server.bat deleted file mode 100644 index 1085b4e941..0000000000 --- a/bin/windows/go-gin-petstore-server.bat +++ /dev/null @@ -1,21 +0,0 @@ -setlocal - -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -set SPEC=modules\openapi-generator\src\test\resources\3_0\petstore.yaml -set GENERATOR=go-gin-server -set STUB_DIR=samples\server\petstore\go-gin-api-server - -echo Removing files and folders under %STUB_DIR% -del /F /S /Q %STUB_DIR%\go - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate -i %SPEC% -g %GENERATOR% -o %STUB_DIR% --additional-properties packageName=petstoreserver - -java %JAVA_OPTS% -jar %executable% %ags% - -endlocal diff --git a/bin/windows/go-petstore-server.bat b/bin/windows/go-petstore-server.bat deleted file mode 100644 index 32ab6977d2..0000000000 --- a/bin/windows/go-petstore-server.bat +++ /dev/null @@ -1,21 +0,0 @@ -setlocal - -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -set SPEC=modules\openapi-generator\src\test\resources\3_0\petstore.yaml -set GENERATOR=go-server -set STUB_DIR=samples\server\petstore\go-api-server - -echo Removing files and folders under %STUB_DIR% -del /F /S /Q %STUB_DIR%\go - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate -i %SPEC% -g %GENERATOR% -o %STUB_DIR% --additional-properties packageName=petstoreserver - -java %JAVA_OPTS% -jar %executable% %ags% - -endlocal diff --git a/bin/windows/go-petstore-withxml.bat b/bin/windows/go-petstore-withxml.bat deleted file mode 100644 index e24f3798f8..0000000000 --- a/bin/windows/go-petstore-withxml.bat +++ /dev/null @@ -1,21 +0,0 @@ -setlocal - -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -set SPEC=modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -set GENERATOR=go -set STUB_DIR=samples\client\petstore\go\go-petstore-withXml - -echo Removing files and folders under %STUB_DIR% -del /F /S /Q %STUB_DIR% - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate -t modules\openapi-generator\src\main\resources\go -i %SPEC% -g %GENERATOR% -o %STUB_DIR% --additional-properties packageName=petstore,withXml=true - -java %JAVA_OPTS% -jar %executable% %ags% - -endlocal \ No newline at end of file diff --git a/bin/windows/go-petstore.bat b/bin/windows/go-petstore.bat deleted file mode 100755 index 8f00f7070a..0000000000 --- a/bin/windows/go-petstore.bat +++ /dev/null @@ -1,21 +0,0 @@ -setlocal - -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -set SPEC=modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -set GENERATOR=go -set STUB_DIR=samples\client\petstore\go\go-petstore - -echo Removing files and folders under %STUB_DIR% -del /F /S /Q %STUB_DIR% - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -DloggerPath=conf/log4j.properties -set ags=generate -t modules\openapi-generator\src\main\resources\go -i %SPEC% -g %GENERATOR% -o %STUB_DIR% --additional-properties packageName=petstore - -java %JAVA_OPTS% -jar %executable% %ags% - -endlocal \ No newline at end of file diff --git a/bin/windows/graphql-nodejs-express-petstore-server.bat b/bin/windows/graphql-nodejs-express-petstore-server.bat deleted file mode 100755 index 1cb7b3a8e7..0000000000 --- a/bin/windows/graphql-nodejs-express-petstore-server.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\graphql-nodejs-express-server -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g graphql-nodejs-express-server -o samples\server\petstore\graphql-nodejs-express-server - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/graphql-schema-petstore.bat b/bin/windows/graphql-schema-petstore.bat deleted file mode 100755 index ad9d5c5fde..0000000000 --- a/bin/windows/graphql-schema-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 -t modules\openapi-generator\src\main\resources\graphql-schema -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g graphql-schema -o samples\config\petstore\graphql-schema - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/groovy-petstore.bat b/bin/windows/groovy-petstore.bat deleted file mode 100644 index 67be72e613..0000000000 --- a/bin/windows/groovy-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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "groovy-petstore-client" -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g groovy -o samples\client\petstore\nim - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/haskell-http-client-petstore.bat b/bin/windows/haskell-http-client-petstore.bat deleted file mode 100755 index 5bce7b5e8c..0000000000 --- a/bin/windows/haskell-http-client-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g haskell-http-client -o samples\client\petstore\haskell-http-client - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/html-petstore.bat b/bin/windows/html-petstore.bat deleted file mode 100755 index c6720eb10b..0000000000 --- a/bin/windows/html-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g html -o samples\documentation\html - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/html2-petstore.bat b/bin/windows/html2-petstore.bat deleted file mode 100644 index bc278013c6..0000000000 --- a/bin/windows/html2-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g html2 -o samples\documentation\html2 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-all.bat b/bin/windows/java-petstore-all.bat deleted file mode 100644 index bb661a9fa1..0000000000 --- a/bin/windows/java-petstore-all.bat +++ /dev/null @@ -1,20 +0,0 @@ -call .\bin\windows\java-petstore-feign-10x.bat -call .\bin\windows\java-petstore-google-api-client.bat -call .\bin\windows\java-petstore-jersey1.bat -call .\bin\windows\java-petstore-jersey2-java8.bat -call .\bin\windows\java-petstore-native.bat -call .\bin\windows\java-petstore-okhttp-gson-parcelable.bat -call .\bin\windows\java-petstore-okhttp-gson.bat -call .\bin\windows\java-petstore-rest-assured.bat -call .\bin\windows\java-petstore-rest-assured-jackson.bat -call .\bin\windows\java-petstore-resteasy.bat -call .\bin\windows\java-petstore-resttemplate-withxml.bat -call .\bin\windows\java-petstore-resttemplate.bat -call .\bin\windows\java-petstore-retrofit2-play24.bat -call .\bin\windows\java-petstore-retrofit2-play25.bat -call .\bin\windows\java-petstore-retrofit2-play26.bat -call .\bin\windows\java-petstore-retrofit2.bat -call .\bin\windows\java-petstore-retrofit2rx.bat -call .\bin\windows\java-petstore-retrofit2rx2.bat -call .\bin\windows\java-petstore-vertx.bat -call .\bin\windows\java-petstore-webclient.bat diff --git a/bin/windows/java-petstore-feign-10x.bat b/bin/windows/java-petstore-feign-10x.bat deleted file mode 100644 index 68fda6d023..0000000000 --- a/bin/windows/java-petstore-feign-10x.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\Java -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-feign-10x.json -o samples\client\petstore\java\feign10x --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-google-api-client.bat b/bin/windows/java-petstore-google-api-client.bat deleted file mode 100644 index ae005af5c9..0000000000 --- a/bin/windows/java-petstore-google-api-client.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\Java -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-google-api-client.json -o samples\client\petstore\java\google-api-client --additional-properties hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-jersey1.bat b/bin/windows/java-petstore-jersey1.bat deleted file mode 100644 index b862cb16d9..0000000000 --- a/bin/windows/java-petstore-jersey1.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 --artifact-id petstore-java-client-jersey1 -t modules\openapi-generator\src\main\resources\Java -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -o samples\client\petstore\java\jersey1 --additional-properties hideGenerationTimestamp=true --library=jersey1 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-jersey2-java8.bat b/bin/windows/java-petstore-jersey2-java8.bat deleted file mode 100644 index 5880a6554f..0000000000 --- a/bin/windows/java-petstore-jersey2-java8.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-jersey2-java8.json -o samples\client\petstore\java\jersey2-java8 --additional-properties hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-microprofile.bat b/bin/windows/java-petstore-microprofile.bat deleted file mode 100755 index 4367768ea1..0000000000 --- a/bin/windows/java-petstore-microprofile.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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "microprofile-rest-client" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g java --library microprofile -o samples\client\petstore\java\microprofile-rest-client - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-native.bat b/bin/windows/java-petstore-native.bat deleted file mode 100644 index 8980399c81..0000000000 --- a/bin/windows/java-petstore-native.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\Java -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-native.json -o samples\client\petstore\java\native --additional-properties hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-okhttp-gson-parcelable.bat b/bin/windows/java-petstore-okhttp-gson-parcelable.bat deleted file mode 100644 index fb88907214..0000000000 --- a/bin/windows/java-petstore-okhttp-gson-parcelable.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 --artifact-id petstore-okhttp-gson-parcelableModel -t modules\openapi-generator\src\main\resources\Java -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-okhttp-gson.json -o samples\client\petstore\java\okhttp-gson-parcelableModel --additional-properties hideGenerationTimestamp=true,parcelableModel=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-okhttp-gson.bat b/bin/windows/java-petstore-okhttp-gson.bat deleted file mode 100755 index 0965f6a6ae..0000000000 --- a/bin/windows/java-petstore-okhttp-gson.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\Java -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-okhttp-gson.json -o samples\client\petstore\java\okhttp-gson --additional-properties hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-rest-assured-jackson.bat b/bin/windows/java-petstore-rest-assured-jackson.bat deleted file mode 100644 index 070156e2f4..0000000000 --- a/bin/windows/java-petstore-rest-assured-jackson.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\Java -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-rest-assured-jackson.json -o samples\client\petstore\java\rest-assured-jackson --additional-properties hideGenerationTimestamp=true,booleanGetterPrefix=is,java8=true,dateLibrary=java8,serializationLibrary=jackson,useBeanValidation=true,performBeanValidation=true, - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-rest-assured.bat b/bin/windows/java-petstore-rest-assured.bat deleted file mode 100644 index d83f8c4289..0000000000 --- a/bin/windows/java-petstore-rest-assured.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\Java -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-rest-assured.json -o samples\client\petstore\java\rest-assured --additional-properties hideGenerationTimestamp=true --additional-properties useBeanValidation=true --additional-properties performBeanValidation=true --additional-properties booleanGetterPrefix=is - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-resttemplate-resteasy.bat b/bin/windows/java-petstore-resttemplate-resteasy.bat deleted file mode 100644 index 9cf81f4e10..0000000000 --- a/bin/windows/java-petstore-resttemplate-resteasy.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-resteasy.json -o samples\client\petstore\java\resteasy --additional-properties hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-resttemplate-webclient.bat b/bin/windows/java-petstore-resttemplate-webclient.bat deleted file mode 100644 index 3330fc590a..0000000000 --- a/bin/windows/java-petstore-resttemplate-webclient.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-webclient.json -o samples\client\petstore\java\webclient --additional-properties hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-resttemplate-withxml.bat b/bin/windows/java-petstore-resttemplate-withxml.bat deleted file mode 100644 index ee67b4cd43..0000000000 --- a/bin/windows/java-petstore-resttemplate-withxml.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 --artifact-id petstore-resttemplate-withxml -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-resttemplate.json -o samples\client\petstore\java\resttemplate-withXml --additional-properties hideGenerationTimestamp=true,withXml=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-resttemplate.bat b/bin/windows/java-petstore-resttemplate.bat deleted file mode 100644 index 50de951c12..0000000000 --- a/bin/windows/java-petstore-resttemplate.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-resttemplate.json -o samples\client\petstore\java\resttemplate --additional-properties hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-retrofit2-all.bat b/bin/windows/java-petstore-retrofit2-all.bat deleted file mode 100644 index bb6d0dee4d..0000000000 --- a/bin/windows/java-petstore-retrofit2-all.bat +++ /dev/null @@ -1,6 +0,0 @@ -call .\bin\windows\java-petstore-retrofit2-play24.bat -call .\bin\windows\java-petstore-retrofit2-play25.bat -call .\bin\windows\java-petstore-retrofit2-play26.bat -call .\bin\windows\java-petstore-retrofit2.bat -call .\bin\windows\java-petstore-retrofit2rx.bat -call .\bin\windows\java-petstore-retrofit2rx2.bat diff --git a/bin/windows/java-petstore-retrofit2-play24.bat b/bin/windows/java-petstore-retrofit2-play24.bat deleted file mode 100644 index bfb57e1bb6..0000000000 --- a/bin/windows/java-petstore-retrofit2-play24.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 --artifact-id petstore-java-client-retrofit2-play24 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2-play24.json -o samples\client\petstore\java\retrofit2-play24 --additional-properties hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-retrofit2-play25.bat b/bin/windows/java-petstore-retrofit2-play25.bat deleted file mode 100644 index d76bb00e1e..0000000000 --- a/bin/windows/java-petstore-retrofit2-play25.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 --artifact-id petstore-java-client-retrofit2-play25 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2-play25.json -o samples\client\petstore\java\retrofit2-play25 --additional-properties hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-retrofit2-play26.bat b/bin/windows/java-petstore-retrofit2-play26.bat deleted file mode 100644 index 2e740ac67d..0000000000 --- a/bin/windows/java-petstore-retrofit2-play26.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 --artifact-id petstore-java-client-retrofit2-play26 -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2-play26.json -o samples\client\petstore\java\retrofit2-play26 --additional-properties hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-retrofit2.bat b/bin/windows/java-petstore-retrofit2.bat deleted file mode 100644 index c21b2941a5..0000000000 --- a/bin/windows/java-petstore-retrofit2.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\Java -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2.json -o samples\client\petstore\java\retrofit2 --additional-properties hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-retrofit2rx.bat b/bin/windows/java-petstore-retrofit2rx.bat deleted file mode 100644 index c62e07cf07..0000000000 --- a/bin/windows/java-petstore-retrofit2rx.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\Java -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2rx.json -o samples\client\petstore\java\retrofit2rx --additional-properties useRxJava=true,hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-retrofit2rx2.bat b/bin/windows/java-petstore-retrofit2rx2.bat deleted file mode 100644 index a9521ef27c..0000000000 --- a/bin/windows/java-petstore-retrofit2rx2.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\Java -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-retrofit2rx2.json -o samples\client\petstore\java\retrofit2rx2 --additional-properties useRxJava2=true,hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-vertx.bat b/bin/windows/java-petstore-vertx.bat deleted file mode 100644 index 133b8eb717..0000000000 --- a/bin/windows/java-petstore-vertx.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\Java -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin\java-petstore-vertx.json -o samples\client\petstore\java\vertx --additional-properties hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-petstore-webclient.bat b/bin/windows/java-petstore-webclient.bat deleted file mode 100644 index 17fb94b012..0000000000 --- a/bin/windows/java-petstore-webclient.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -g java -c bin/java-petstore-webclient.json -o samples/client/petstore/java/webclient --additional-properties hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-pkmst-petstore-server.bat b/bin/windows/java-pkmst-petstore-server.bat deleted file mode 100644 index ace44650ed..0000000000 --- a/bin/windows/java-pkmst-petstore-server.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g java-pkmst -o samples\server\petstore\java-pkmst --additional-properties hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-play-framework-petstore-server.bat b/bin/windows/java-play-framework-petstore-server.bat deleted file mode 100644 index 887fdd2570..0000000000 --- a/bin/windows/java-play-framework-petstore-server.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g java-play-framework -o samples\server\petstore\java-play-framework --additional-properties hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-vertx-async-petstore-server.bat b/bin/windows/java-vertx-async-petstore-server.bat deleted file mode 100644 index 5200b705a5..0000000000 --- a/bin/windows/java-vertx-async-petstore-server.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g java-vertx -o samples\server\petstore\java-vertx\async --additional-properties vertxSwaggerRouterVersion=1.2.0,hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/java-vertx-rx-petstore-server.bat b/bin/windows/java-vertx-rx-petstore-server.bat deleted file mode 100644 index b107bd837e..0000000000 --- a/bin/windows/java-vertx-rx-petstore-server.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g java-vertx -o samples\server\petstore\java-vertx\rx --additional-properties vertxSwaggerRouterVersion=1.2.0,rxInterface=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/javascript-apollo-petstore.bat b/bin/windows/javascript-apollo-petstore.bat deleted file mode 100755 index 144ada50e4..0000000000 --- a/bin/windows/javascript-apollo-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.yaml -g javascript-apollo -o samples\client\petstore\javascript-apollo --additional-properties appName=PetstoreClient - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/javascript-es6-petstore.bat b/bin/windows/javascript-es6-petstore.bat deleted file mode 100644 index d7ef07a840..0000000000 --- a/bin/windows/javascript-es6-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\3_0\petstore-with-fake-endpoints-models-for-testing.yaml -g javascript -o samples\client\petstore\javascript-es6 - -java %JAVA_OPTS% -jar %executable% %ags% --additional-properties appName=PetstoreClient diff --git a/bin/windows/javascript-petstore-all.bat b/bin/windows/javascript-petstore-all.bat deleted file mode 100755 index 0775478ae9..0000000000 --- a/bin/windows/javascript-petstore-all.bat +++ /dev/null @@ -1,2 +0,0 @@ -call .\bin\windows\javascript-es6-petstore.bat -call .\bin\windows\javascript-promise-es6-petstore.bat diff --git a/bin/windows/javascript-promise-es6-petstore.bat b/bin/windows/javascript-promise-es6-petstore.bat deleted file mode 100644 index 86f71f55ce..0000000000 --- a/bin/windows/javascript-promise-es6-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\3_0\petstore-with-fake-endpoints-models-for-testing.yaml -g javascript -o samples\client\petstore\javascript-promise-es6 --additional-properties appName=PetstoreClient,usePromises=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/javascript-promise-petstore.bat b/bin/windows/javascript-promise-petstore.bat deleted file mode 100755 index 57756146e6..0000000000 --- a/bin/windows/javascript-promise-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 javascript -o samples\client\petstore\javascript-promise --additional-properties usePromises=true,useES6=false,appName=PetstoreClient - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/jaxrs-cxf-cdi-petstore-server.bat b/bin/windows/jaxrs-cxf-cdi-petstore-server.bat deleted file mode 100644 index 48aadc36fe..0000000000 --- a/bin/windows/jaxrs-cxf-cdi-petstore-server.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 -DloggerPath=conf\log4j.properties -set ags=generate -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf-cdi -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g jaxrs-cxf-cdi -o samples\server\petstore\jaxrs-cxf-cdi --additional-properties hideGenerationTimestamp=true %* - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/jaxrs-cxf-client-petstore.bat b/bin/windows/jaxrs-cxf-client-petstore.bat deleted file mode 100755 index 2fb0ad0a82..0000000000 --- a/bin/windows/jaxrs-cxf-client-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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "jaxrs-cxf-client-petstore-client" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g jaxrs-cxf-client -o samples\client\petstore\jaxrs-cxf-client %* - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/jaxrs-cxf-petstore-server-annotated-base-path.bat b/bin/windows/jaxrs-cxf-petstore-server-annotated-base-path.bat deleted file mode 100644 index 6df7234a23..0000000000 --- a/bin/windows/jaxrs-cxf-petstore-server-annotated-base-path.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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id cxf-annotated-basepath -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g jaxrs-cxf -o samples\server\petstore\jaxrs-cxf-annotated-base-path --additional-properties hideGenerationTimestamp=true,useAnnotatedBasePath=true,serverPort=8082 %* - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/jaxrs-cxf-petstore-server-non-spring-application.bat b/bin/windows/jaxrs-cxf-petstore-server-non-spring-application.bat deleted file mode 100644 index b239011963..0000000000 --- a/bin/windows/jaxrs-cxf-petstore-server-non-spring-application.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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id cxf-server-non-spring -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g jaxrs-cxf -o samples\server\petstore\jaxrs-cxf-non-spring-app --additional-properties hideGenerationTimestamp=true,generateNonSpringApplication=true,serverPort=8082 %* - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/jaxrs-cxf-petstore-server-test-data.bat b/bin/windows/jaxrs-cxf-petstore-server-test-data.bat deleted file mode 100644 index ac42b6c047..0000000000 --- a/bin/windows/jaxrs-cxf-petstore-server-test-data.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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id cxf-test-data -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf-ext -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf-extended -o samples\server\petstore\jaxrs-cxf-test-data --additional-properties hideGenerationTimestamp=true,useAnnotatedBasePath=true --generate-alias-as-model --additional-properties java8=true,generateSpringApplication=true,generateSpringBootApplication=true,generateOperationBody=true,loadTestDataFromFile=true %* - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/jaxrs-cxf-petstore-server.bat b/bin/windows/jaxrs-cxf-petstore-server.bat deleted file mode 100644 index 82880f5959..0000000000 --- a/bin/windows/jaxrs-cxf-petstore-server.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 -DloggerPath=conf/log4j.properties -set ags=generate -t modules\openapi-generator\src\main\resources\JavaJaxRS\cxf -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-cxf -o samples\server\petstore\jaxrs-cxf --additional-properties hideGenerationTimestamp=true %* - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/jaxrs-spec-petstore-server-interface.bat b/bin/windows/jaxrs-spec-petstore-server-interface.bat deleted file mode 100644 index 41c29d41cc..0000000000 --- a/bin/windows/jaxrs-spec-petstore-server-interface.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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "jaxrs-cxf-client-petstore-client" -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-spec -o samples\server\petstore\jaxrs-spec-interface --additional-properties hideGenerationTimestamp=true,serializableModel=true,interfaceOnly=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/jaxrs-spec-petstore-server.bat b/bin/windows/jaxrs-spec-petstore-server.bat deleted file mode 100644 index eeb11da17f..0000000000 --- a/bin/windows/jaxrs-spec-petstore-server.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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "jaxrs-cxf-client-petstore-client" -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-spec -o samples\server\petstore\jaxrs-spec --additional-properties hideGenerationTimestamp=true,serializableModel=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/k6-petstore.bat b/bin/windows/k6-petstore.bat deleted file mode 100755 index 098a050214..0000000000 --- a/bin/windows/k6-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g k6 -o samples\client\petstore\k6 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/kotlin-client-all.bat b/bin/windows/kotlin-client-all.bat deleted file mode 100644 index d4dd27a9f6..0000000000 --- a/bin/windows/kotlin-client-all.bat +++ /dev/null @@ -1,11 +0,0 @@ -call powershell -command "& '%~dp0\kotlin-client-gson.bat'" -call powershell -command "& '%~dp0\kotlin-client-moshi-codegen.bat'" -call powershell -command "& '%~dp0\kotlin-client-nonpublic.bat'" -call powershell -command "& '%~dp0\kotlin-client-okhttp3.bat'" -call powershell -command "& '%~dp0\kotlin-client-petstore-multiplatform.bat'" -call powershell -command "& '%~dp0\kotlin-client-petstore.bat'" -call powershell -command "& '%~dp0\kotlin-client-string.bat'" -call powershell -command "& '%~dp0\kotlin-client-threetenbp.bat'" -call powershell -command "& '%~dp0\kotlin-client-nullable.bat'" -call powershell -command "& '%~dp0\kotlin-client-json-request-string.bat'" -call powershell -command "& '%~dp0\kotlin-client-retrofit2.bat'" \ No newline at end of file diff --git a/bin/windows/kotlin-client-gson.bat b/bin/windows/kotlin-client-gson.bat deleted file mode 100644 index 30eeaf423f..0000000000 --- a/bin/windows/kotlin-client-gson.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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "kotlin-petstore-gson" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --additional-properties serializationLibrary=gson -o samples\client\petstore\kotlin-gson - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/kotlin-client-json-request-string.bat b/bin/windows/kotlin-client-json-request-string.bat deleted file mode 100644 index 1b257af020..0000000000 --- a/bin/windows/kotlin-client-json-request-string.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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "kotlin-petstore-json-request-string" -i modules\openapi-generator\src\test\resources\2_0\petstore-with-date-field.yaml -g kotlin --additional-properties requestDateConverter=toString -o samples\client\petstore\kotlin-json-request-string - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/kotlin-client-moshi-codegen.bat b/bin/windows/kotlin-client-moshi-codegen.bat deleted file mode 100644 index 5a2ff14ac7..0000000000 --- a/bin/windows/kotlin-client-moshi-codegen.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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "kotlin-petstore-moshi-codegen" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --additional-properties serializationLibrary=moshi,moshiCodeGen=true -o samples\client\petstore\kotlin-moshi-codegen - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/kotlin-client-nonpublic.bat b/bin/windows/kotlin-client-nonpublic.bat deleted file mode 100644 index 899d431806..0000000000 --- a/bin/windows/kotlin-client-nonpublic.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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "kotlin-petstore-nonpublic" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --additional-properties nonPublicApi=true -o samples\client\petstore\kotlin-nonpublic - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/kotlin-client-nullable.bat b/bin/windows/kotlin-client-nullable.bat deleted file mode 100644 index cdbfa49839..0000000000 --- a/bin/windows/kotlin-client-nullable.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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --artifact-id "kotlin-petstore-nullable" --additional-properties nullableReturnType=true,serializableModel=true -o samples\client\petstore\kotlin-nullable - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/kotlin-client-okhttp3.bat b/bin/windows/kotlin-client-okhttp3.bat deleted file mode 100644 index 8c16e37fe0..0000000000 --- a/bin/windows/kotlin-client-okhttp3.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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "kotlin-petstore-okhttp3" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --library jvm-okhttp3 -o samples\client\petstore\kotlin-okhttp3 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/kotlin-client-petstore-multiplatform.bat b/bin/windows/kotlin-client-petstore-multiplatform.bat deleted file mode 100644 index 628170d600..0000000000 --- a/bin/windows/kotlin-client-petstore-multiplatform.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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "kotlin-client-petstore-multiplatform" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --library multiplatform -o samples\client\petstore\kotlin-multiplatform - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/kotlin-client-petstore.bat b/bin/windows/kotlin-client-petstore.bat deleted file mode 100644 index a193d7c6a3..0000000000 --- a/bin/windows/kotlin-client-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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "kotlin-petstore-client" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin -o samples\client\petstore\kotlin --additional-properties dateLibrary=java8,serializableModel=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/kotlin-client-retrofit2.bat b/bin/windows/kotlin-client-retrofit2.bat deleted file mode 100644 index 123c8c28dc..0000000000 --- a/bin/windows/kotlin-client-retrofit2.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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "kotlin-petstore-retrofit2" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --library jvm-retrofit2 -o samples\client\petstore\kotlin-retrofit2 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/kotlin-client-string.bat b/bin/windows/kotlin-client-string.bat deleted file mode 100644 index 6e0310ecad..0000000000 --- a/bin/windows/kotlin-client-string.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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --artifact-id "kotlin-petstore-string" --additional-properties dateLibrary=string,serializableModel=true,sortParamsByRequiredFlag=false,sortModelPropertiesByRequiredFlag=false -o samples\client\petstore\kotlin-string - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/kotlin-client-threetenbp.bat b/bin/windows/kotlin-client-threetenbp.bat deleted file mode 100644 index adc5c68e01..0000000000 --- a/bin/windows/kotlin-client-threetenbp.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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin --artifact-id "kotlin-petstore-threetenbp" --additional-properties dateLibrary=threetenbp -o samples\client\petstore\kotlin-threetenbp - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/kotlin-server-petstore.bat b/bin/windows/kotlin-server-petstore.bat deleted file mode 100644 index 7ed79a0448..0000000000 --- a/bin/windows/kotlin-server-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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "kotlin-petstore-server" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin-server --library=ktor -o samples\server\petstore\kotlin - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/kotlin-springboot-petstore-server.bat b/bin/windows/kotlin-springboot-petstore-server.bat deleted file mode 100644 index 4133a780d4..0000000000 --- a/bin/windows/kotlin-springboot-petstore-server.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin-spring -o samples\server\petstore\kotlin-springboot --additional-properties=library=spring-boot,beanValidations=true,swaggerAnnotations=true,serviceImplementation=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/kotlin-vertx-server-petstore.bat b/bin/windows/kotlin-vertx-server-petstore.bat deleted file mode 100644 index 6fd12f43d8..0000000000 --- a/bin/windows/kotlin-vertx-server-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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "kotlin-vertx-petstore-server" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g kotlin-vertx -o samples\server\petstore\kotlin\vertx - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/lua-petstore.bat b/bin/windows/lua-petstore.bat deleted file mode 100755 index fe06bd229a..0000000000 --- a/bin/windows/lua-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g lua -o samples\client\petstore\lua - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/markdown-documentation-petstore.bat b/bin/windows/markdown-documentation-petstore.bat deleted file mode 100644 index 716ddb8fc4..0000000000 --- a/bin/windows/markdown-documentation-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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "markdown-petstore-documentation" -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g markdown -o samples\documentation\petstore\markdown - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/mysql-schema-petstore.bat b/bin/windows/mysql-schema-petstore.bat deleted file mode 100755 index 7590d2c0a7..0000000000 --- a/bin/windows/mysql-schema-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\3_0\petstore-with-fake-endpoints-models-for-testing.yaml -g mysql-schema -o samples\schema\petstore\mysql - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/nancyfx-petstore-server.bat b/bin/windows/nancyfx-petstore-server.bat deleted file mode 100644 index 49460ca6c4..0000000000 --- a/bin/windows/nancyfx-petstore-server.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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g csharp-nancyfx -o samples\server\petstore\nancyfx\ - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/nim-client-petstore.bat b/bin/windows/nim-client-petstore.bat deleted file mode 100644 index 875bff9fe8..0000000000 --- a/bin/windows/nim-client-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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "nim-petstore-client" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml --additional-properties packageName=petstore -g nim -o samples\client\petstore\nim - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/objc-petstore.bat b/bin/windows/objc-petstore.bat deleted file mode 100755 index d5264e33c3..0000000000 --- a/bin/windows/objc-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.yaml -g objc -o samples\client\petstore\objc\default --additional-properties appName=PetstoreClient - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/ocaml-petstore.bat b/bin/windows/ocaml-petstore.bat deleted file mode 100755 index 09c04a8301..0000000000 --- a/bin/windows/ocaml-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g ocaml -o samples\client\petstore\ocaml - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/perl-petstore.bat b/bin/windows/perl-petstore.bat deleted file mode 100755 index ce307bfee5..0000000000 --- a/bin/windows/perl-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 perl -o samples\client\petstore\perl - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/php-lumen-petstore-server.bat b/bin/windows/php-lumen-petstore-server.bat deleted file mode 100644 index d5aa42ba79..0000000000 --- a/bin/windows/php-lumen-petstore-server.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 php-lumen -o samples\server\petstore\php-lumen - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/php-petstore.bat b/bin/windows/php-petstore.bat deleted file mode 100755 index ba088beade..0000000000 --- a/bin/windows/php-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 php -o samples\client\petstore\php\OpenAPIClient-php - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/php-silex-petstore-server.bat b/bin/windows/php-silex-petstore-server.bat deleted file mode 100644 index fcacba12e3..0000000000 --- a/bin/windows/php-silex-petstore-server.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g php-silex-deprecated -o samples\server\petstore\php-silex\OpenAPIServer - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/php-slim-server-petstore.bat b/bin/windows/php-slim-server-petstore.bat deleted file mode 100755 index 4e896f0184..0000000000 --- a/bin/windows/php-slim-server-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 php-slim-deprecated -o samples\server\petstore\php-slim - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/php-slim4-server-petstore.bat b/bin/windows/php-slim4-server-petstore.bat deleted file mode 100644 index c1ac0ef732..0000000000 --- a/bin/windows/php-slim4-server-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 php-slim4 -o samples\server\petstore\php-slim4 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/php-symfony-petstore-server.bat b/bin/windows/php-symfony-petstore-server.bat deleted file mode 100644 index 5a7ce4f218..0000000000 --- a/bin/windows/php-symfony-petstore-server.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g php-symfony -o samples\server\petstore\php-symfony\SymfonyBundle-php - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/php-ze-ph-petstore-server.bat b/bin/windows/php-ze-ph-petstore-server.bat deleted file mode 100644 index da5eacc363..0000000000 --- a/bin/windows/php-ze-ph-petstore-server.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 php-ze-ph -o samples\server\petstore\php-ze-ph - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/plantuml-documentation-petstore.bat b/bin/windows/plantuml-documentation-petstore.bat deleted file mode 100644 index 4a0f9d611f..0000000000 --- a/bin/windows/plantuml-documentation-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 -DloggerPath=conf/log4j.properties -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/powershell-petstore.bat b/bin/windows/powershell-petstore.bat deleted file mode 100755 index f5ea2c5f91..0000000000 --- a/bin/windows/powershell-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\3_0\petstore.yaml -g powershell -o samples\client\petstorep\powershell --additional-properties powershellGalleryUrl=https://www.powershellgallery.com/packages/PSPetstore,packageGuid=a27b908d-2a20-467f-bc32-af6f3a654ac5,packageName=PSPetstore,apiNamePrefix=PS,packageVersion=0.1.2,commonVerbs=Delete=Remove:Patch=Update - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/protobuf-schema-petstore.bat b/bin/windows/protobuf-schema-petstore.bat deleted file mode 100755 index 089b714681..0000000000 --- a/bin/windows/protobuf-schema-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 -t modules\openapi-generator\src\main\resources\protobuf-schema -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g protobuf-schema -o samples\config\petstore\protobuf-schema - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/python-experimental-petstore.bat b/bin/windows/python-experimental-petstore.bat deleted file mode 100644 index 2680649d00..0000000000 --- a/bin/windows/python-experimental-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\python-client-experimental\petstore-with-fake-endpoints-models-for-testing.yaml -g python-experimental -o samples\client\petstore\python-experimental --additional-properties packageName=petstore_api - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/python-petstore.bat b/bin/windows/python-petstore.bat deleted file mode 100755 index c09fd3a44b..0000000000 --- a/bin/windows/python-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 python -o samples\client\petstore\python --additional-properties packageName=petstore_api - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/python2-flask-petstore.bat b/bin/windows/python2-flask-petstore.bat deleted file mode 100755 index 54189a7d19..0000000000 --- a/bin/windows/python2-flask-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.yaml -g python-flask -o samples\server\petstore\python-flask-python2 -c bin\supportPython2.json - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/python3-flask-petstore.bat b/bin/windows/python3-flask-petstore.bat deleted file mode 100755 index 56205cf151..0000000000 --- a/bin/windows/python3-flask-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.yaml -g python-flask -o samples\server\petstore\python-flask - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/r-petstore.bat b/bin/windows/r-petstore.bat deleted file mode 100755 index b1799427f0..0000000000 --- a/bin/windows/r-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g r -o samples\client\petstore\R --additional-properties packageName=petstore,returnExceptionOnFailure=false,exceptionPackage=default - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/rails5-petstore-server.bat b/bin/windows/rails5-petstore-server.bat deleted file mode 100755 index 4f142b59c6..0000000000 --- a/bin/windows/rails5-petstore-server.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g ruby-on-rails -o samples\server\petstore\rails5\ - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/ruby-client-petstore.bat b/bin/windows/ruby-client-petstore.bat deleted file mode 100755 index aab6582f68..0000000000 --- a/bin/windows/ruby-client-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.yaml -g ruby -o samples\client\petstore\ruby - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/run-all-petstore.cmd b/bin/windows/run-all-petstore.cmd deleted file mode 100644 index 9a8bdab682..0000000000 --- a/bin/windows/run-all-petstore.cmd +++ /dev/null @@ -1,15 +0,0 @@ -REM this batch file will loop through all the .bat files under bin\windows\ -REM execute the script and check the error level to see if there's any error - -echo IMPORTANT: this script should be run by the CI (e.g. appveyor) only. There's no need to run this script to update Petstore samples for all generators. -echo Please press CTRL+C to stop or the script will continue in 10 seconds. - -timeout 10 - -for /f "delims=" %%i in ('dir /b ".\bin\windows\*.bat"') do ( - - CALL .\bin\windows\%%i - - IF ERRORLEVEL 1 IF NOT ERRORLEVEL 2 exit /b 1 - -) diff --git a/bin/windows/rust-petstore.bat b/bin/windows/rust-petstore.bat deleted file mode 100644 index 8a051c6b19..0000000000 --- a/bin/windows/rust-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g rust -o samples\client\petstore\rust - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/rust-server-petstore.bat b/bin/windows/rust-server-petstore.bat deleted file mode 100755 index 4654e01091..0000000000 --- a/bin/windows/rust-server-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 -DloggerPath=conf/log4j.properties -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore-with-fake-endpoints-models-for-testing.yaml -g rust-server -o samples\server\petstore\rust-server - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/scala-akka-http-server-petstore.bat b/bin/windows/scala-akka-http-server-petstore.bat deleted file mode 100644 index d59f6fb47b..0000000000 --- a/bin/windows/scala-akka-http-server-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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "scala-akka-http-petstore-server" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g scala-akka-http-server -o samples\server\petstore\scala-akka-http-server - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/scala-akka-petstore.bat b/bin/windows/scala-akka-petstore.bat deleted file mode 100755 index 131859e4ec..0000000000 --- a/bin/windows/scala-akka-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 -DloggerPath=conf/log4j.properties -set ags=generate --artifact-id "scala-akka-petstore-client" -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g scala-akka -o samples\client\petstore\scala-akka - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/scala-gatling-petstore.sh b/bin/windows/scala-gatling-petstore.sh deleted file mode 100755 index f8b0168fd5..0000000000 --- a/bin/windows/scala-gatling-petstore.sh +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -t modules\openapi-generator\src\main\resources\scala-gatling -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g scala-gatling -o samples\client\petstore\scala-gatling - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/scala-httpclient-petstore.bat b/bin/windows/scala-httpclient-petstore.bat deleted file mode 100755 index 077c5cdc62..0000000000 --- a/bin/windows/scala-httpclient-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.yaml -g scala-httpclient-deprecated -o samples\client\petstore\scala-httpclient - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/scala-lagom-petstore.bat b/bin/windows/scala-lagom-petstore.bat deleted file mode 100644 index 16e91a9e0b..0000000000 --- a/bin/windows/scala-lagom-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.yaml -g scala-lagom-server -o samples\server\petstore\scala-lagom-server - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/scala-play-framework-petstore.bat b/bin/windows/scala-play-framework-petstore.bat deleted file mode 100755 index 11e4989637..0000000000 --- a/bin/windows/scala-play-framework-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.yaml -g scala-play-server -o samples\server\petstore\scala-play-server - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/spring-mvc-petstore-j8-async-server.bat b/bin/windows/spring-mvc-petstore-j8-async-server.bat deleted file mode 100644 index e87ba8ed7d..0000000000 --- a/bin/windows/spring-mvc-petstore-j8-async-server.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 spring --library=spring-mvc -o samples\server\petstore\spring-mvc-j8-async -c bin\spring-mvc-petstore-j8-async.json --additional-properties hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/spring-mvc-petstore-server.bat b/bin/windows/spring-mvc-petstore-server.bat deleted file mode 100644 index 02783f339c..0000000000 --- a/bin/windows/spring-mvc-petstore-server.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 -c bin\spring-mvc-petstore-server.json -g spring --library=spring-mvc -o samples\server\petstore\spring-mvc --additional-properties hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/springboot-petstore-server.bat b/bin/windows/springboot-petstore-server.bat deleted file mode 100644 index af0e4c2ba1..0000000000 --- a/bin/windows/springboot-petstore-server.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 spring -o samples\server\petstore\springboot --additional-properties hideGenerationTimestamp=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-all.bat b/bin/windows/swift5-all.bat deleted file mode 100755 index 663df4e22d..0000000000 --- a/bin/windows/swift5-all.bat +++ /dev/null @@ -1,2 +0,0 @@ -call .\bin\windows\swift5-petstore-all.bat -call .\bin\windows\swift5-test.bat diff --git a/bin/windows/swift5-petstore-alamofire.bat b/bin/windows/swift5-petstore-alamofire.bat deleted file mode 100755 index b982ea061e..0000000000 --- a/bin/windows/swift5-petstore-alamofire.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\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-alamofire.json -o samples\client\petstore\swift5\alamofireLibrary - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-all.bat b/bin/windows/swift5-petstore-all.bat deleted file mode 100755 index 9d656b1437..0000000000 --- a/bin/windows/swift5-petstore-all.bat +++ /dev/null @@ -1,10 +0,0 @@ -call .\bin\windows\swift5-petstore.bat -call .\bin\windows\swift5-petstore-promisekit.bat -call .\bin\windows\swift5-petstore-result.bat -call .\bin\windows\swift5-petstore-rxswift.bat -call .\bin\windows\swift5-petstore-objcCompatible.bat -call .\bin\windows\swift5-petstore-nonPublicApi.bat -call .\bin\windows\swift5-petstore-urlsession.bat -call .\bin\windows\swift5-petstore-alamofire.bat -call .\bin\windows\swift5-petstore-combine.bat -call .\bin\windows\swift5-petstore-readonlyProperties.bat diff --git a/bin/windows/swift5-petstore-combine.bat b/bin/windows/swift5-petstore-combine.bat deleted file mode 100755 index 5ea7cc88db..0000000000 --- a/bin/windows/swift5-petstore-combine.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\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-combine.json -o samples\client\petstore\swift5\combineLibrary - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-nonPublicApi.bat b/bin/windows/swift5-petstore-nonPublicApi.bat deleted file mode 100755 index 6853336901..0000000000 --- a/bin/windows/swift5-petstore-nonPublicApi.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\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-nonPublicApi.json -o samples\client\petstore\swift5\nonPublicApi - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-objcCompatible.bat b/bin/windows/swift5-petstore-objcCompatible.bat deleted file mode 100755 index 7d9b7047b4..0000000000 --- a/bin/windows/swift5-petstore-objcCompatible.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\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-objcCompatible.json -o samples\client\petstore\swift5\objcCompatible - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-promisekit.bat b/bin/windows/swift5-petstore-promisekit.bat deleted file mode 100755 index cfd9ff41ef..0000000000 --- a/bin/windows/swift5-petstore-promisekit.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\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-promisekit.json -o samples\client\petstore\swift5\promisekitLibrary - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-readonlyProperties.bat b/bin/windows/swift5-petstore-readonlyProperties.bat deleted file mode 100644 index cc297bd1a4..0000000000 --- a/bin/windows/swift5-petstore-readonlyProperties.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\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-readonlyProperties.json -o samples\client\petstore\swift5\readonlyProperties - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-result.bat b/bin/windows/swift5-petstore-result.bat deleted file mode 100755 index 4aabf28d50..0000000000 --- a/bin/windows/swift5-petstore-result.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\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-result.json -o samples\client\petstore\swift5\resultLibrary - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-rxswift.bat b/bin/windows/swift5-petstore-rxswift.bat deleted file mode 100755 index 862c182067..0000000000 --- a/bin/windows/swift5-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\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-rxswift.json -o samples\client\petstore\swift5\rxswiftLibrary - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore-urlSession.bat b/bin/windows/swift5-petstore-urlSession.bat deleted file mode 100755 index 594317a3fa..0000000000 --- a/bin/windows/swift5-petstore-urlSession.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\swift\petstore-with-fake-endpoints-models-for-testing.yaml -g swift5 -c bin\swift5-petstore-urlsession.json -o samples\client\petstore\swift5\urlsessionLibrary - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-petstore.bat b/bin/windows/swift5-petstore.bat deleted file mode 100755 index 26cee2940f..0000000000 --- a/bin/windows/swift5-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 swift5 -o samples\client\petstore\swift5\default - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/swift5-test.bat b/bin/windows/swift5-test.bat deleted file mode 100755 index 60d74aabcf..0000000000 --- a/bin/windows/swift5-test.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\swift5Test.json -g swift5 -c bin\swift5-test.json -o samples\client\test\swift5\default - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-petstore-all.bat b/bin/windows/typescript-angular-petstore-all.bat deleted file mode 100644 index aa3a4fa2f9..0000000000 --- a/bin/windows/typescript-angular-petstore-all.bat +++ /dev/null @@ -1,11 +0,0 @@ -call .\bin\windows\typescript-angular-v6-provided-in-root.bat -call .\bin\windows\typescript-angular-v6-provided-in-root-with-npm.bat -call .\bin\windows\typescript-angular-v6-not-provided-in-root.bat -call .\bin\windows\typescript-angular-v6-not-provided-in-root-with-npm.bat -call .\bin\windows\typescript-angular-v7-provided-in-root.bat -call .\bin\windows\typescript-angular-v7-provided-in-root-with-npm.bat -call .\bin\windows\typescript-angular-v7-not-provided-in-root.bat -call .\bin\windows\typescript-angular-v7-not-provided-in-root-with-npm.bat -call .\bin\windows\typescript-angular-v8-provided-in-root-with-npm.bat -call .\bin\windows\typescript-angular-v8-petstore-provided-in-root-with-prefixed-module-name.bat -call .\bin\windows\typescript-angular-v8-single-request-parameter.bat diff --git a/bin/windows/typescript-angular-v6-not-provided-in-root-with-npm.bat b/bin/windows/typescript-angular-v6-not-provided-in-root-with-npm.bat deleted file mode 100644 index 4e3e38dff4..0000000000 --- a/bin/windows/typescript-angular-v6-not-provided-in-root-with-npm.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -c bin\typescript-angular-v6-petstore-not-provided-in-root-with-npm.json -o samples\client\petstore\typescript-angular-v6-not-provided-in-root\builds\with-npm --additional-properties providedInRoot=false --additional-properties ngVersion=6.0.0 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-v6-not-provided-in-root.bat b/bin/windows/typescript-angular-v6-not-provided-in-root.bat deleted file mode 100644 index d5550355df..0000000000 --- a/bin/windows/typescript-angular-v6-not-provided-in-root.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -o samples\client\petstore\typescript-angular-v6-not-provided-in-root\builds\default --additional-properties providedInRoot=false --additional-properties ngVersion=6.0.0 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-v6-provided-in-root-with-npm.bat b/bin/windows/typescript-angular-v6-provided-in-root-with-npm.bat deleted file mode 100644 index a821b0babc..0000000000 --- a/bin/windows/typescript-angular-v6-provided-in-root-with-npm.bat +++ /dev/null @@ -1,9 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -c bin/typescript-angular-v6-petstore-provided-in-root-with-npm.json -o samples\client\petstore\typescript-angular-v6-provided-in-root\builds\with-npm --additional-properties ngVersion=6.0.0 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-v6-provided-in-root.bat b/bin/windows/typescript-angular-v6-provided-in-root.bat deleted file mode 100644 index 74650e72d1..0000000000 --- a/bin/windows/typescript-angular-v6-provided-in-root.bat +++ /dev/null @@ -1,9 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -o samples\client\petstore\typescript-angular-v6-provided-in-root\builds\default --additional-properties ngVersion=6.0.0 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-v7-not-provided-in-root-with-npm.bat b/bin/windows/typescript-angular-v7-not-provided-in-root-with-npm.bat deleted file mode 100644 index 5a133e1026..0000000000 --- a/bin/windows/typescript-angular-v7-not-provided-in-root-with-npm.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -c bin\typescript-angular-v7-petstore-not-provided-in-root-with-npm.json -o samples\client\petstore\typescript-angular-v7-not-provided-in-root\builds\with-npm --additional-properties providedInRoot=false --additional-properties ngVersion=7.0.0 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-v7-not-provided-in-root.bat b/bin/windows/typescript-angular-v7-not-provided-in-root.bat deleted file mode 100644 index b9a18244d0..0000000000 --- a/bin/windows/typescript-angular-v7-not-provided-in-root.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -o samples\client\petstore\typescript-angular-v7-not-provided-in-root\builds\default --additional-properties ngVersion=7.0.0 --additional-properties providedInRoot=false - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-v7-provided-in-root-with-npm.bat b/bin/windows/typescript-angular-v7-provided-in-root-with-npm.bat deleted file mode 100644 index 38c98efd01..0000000000 --- a/bin/windows/typescript-angular-v7-provided-in-root-with-npm.bat +++ /dev/null @@ -1,9 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -c bin/typescript-angular-v7-petstore-provided-in-root-with-npm.json -o samples\client\petstore\typescript-angular-v7-provided-in-root\builds\with-npm --additional-properties ngVersion=7.0.0 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-v7-provided-in-root.bat b/bin/windows/typescript-angular-v7-provided-in-root.bat deleted file mode 100644 index 2ea04275bc..0000000000 --- a/bin/windows/typescript-angular-v7-provided-in-root.bat +++ /dev/null @@ -1,9 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -o samples\client\petstore\typescript-angular-v7-provided-in-root\builds\default --additional-properties ngVersion=7.0.0 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-v8-petstore-provided-in-root-with-prefixed-module-name.bat b/bin/windows/typescript-angular-v8-petstore-provided-in-root-with-prefixed-module-name.bat deleted file mode 100644 index 1929c6542e..0000000000 --- a/bin/windows/typescript-angular-v8-petstore-provided-in-root-with-prefixed-module-name.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 -) - -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -c bin/typescript-angular-v8-petstore-provided-in-root-with-npm.json -o samples\client\petstore\typescript-angular-v8-provided-in-root\builds\with-prefixed-module-name --additional-properties ngVersion=8.0.0,apiModulePrefix=PetStore - - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-v8-provided-in-root-with-npm.bat b/bin/windows/typescript-angular-v8-provided-in-root-with-npm.bat deleted file mode 100644 index 142c2ac85e..0000000000 --- a/bin/windows/typescript-angular-v8-provided-in-root-with-npm.bat +++ /dev/null @@ -1,9 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -c bin/typescript-angular-v8-petstore-provided-in-root-with-npm.json -o samples\client\petstore\typescript-angular-v8-provided-in-root\builds\with-npm --additional-properties ngVersion=8.0.0 - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angular-v8-single-request-parameter.bat b/bin/windows/typescript-angular-v8-single-request-parameter.bat deleted file mode 100644 index c963702b04..0000000000 --- a/bin/windows/typescript-angular-v8-single-request-parameter.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 -) - -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angular -c bin/typescript-angular-v8-petstore-provided-in-root-with-npm.json -o samples\client\petstore\typescript-angular-v8-provided-in-root\builds\single-request-parameter --additional-properties ngVersion=8.0.0,useSingleRequestParameter=true - - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-angularjs.bat b/bin/windows/typescript-angularjs.bat deleted file mode 100755 index d2e0446326..0000000000 --- a/bin/windows/typescript-angularjs.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-angularjs -o samples\client\petstore\typescript-angularjs - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-aurelia-petstore.bat b/bin/windows/typescript-aurelia-petstore.bat deleted file mode 100644 index 6721b4499f..0000000000 --- a/bin/windows/typescript-aurelia-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.yaml -g typescript-aurelia -o samples\client\petstore\typescript-aurelia\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 deleted file mode 100644 index 8e9a25ddaf..0000000000 --- a/bin/windows/typescript-axios-petstore-all.bat +++ /dev/null @@ -1,10 +0,0 @@ -@ECHO OFF - -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-composed-schemas.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/typescript-axios-petstore-composed-schemas.bat b/bin/windows/typescript-axios-petstore-composed-schemas.bat deleted file mode 100644 index ae70255c20..0000000000 --- a/bin/windows/typescript-axios-petstore-composed-schemas.bat +++ /dev/null @@ -1,14 +0,0 @@ -@ECHO OFF - -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 - -echo -set ags=generate -i modules\openapi-generator\src\test\resources\3_0\composed-schemas.yaml -g typescript-axios -o samples\client\petstore\typescript-axios\builds\composed-schemas - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-axios-petstore-interfaces.bat b/bin/windows/typescript-axios-petstore-interfaces.bat deleted file mode 100644 index 2c34eba5c7..0000000000 --- a/bin/windows/typescript-axios-petstore-interfaces.bat +++ /dev/null @@ -1,12 +0,0 @@ -@ECHO OFF - -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-axios -o samples\client\petstore\typescript-axios\builds\with-interfaces --additional-properties withInterfaces=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-axios-petstore-target-es6.bat b/bin/windows/typescript-axios-petstore-target-es6.bat deleted file mode 100644 index e6a971420f..0000000000 --- a/bin/windows/typescript-axios-petstore-target-es6.bat +++ /dev/null @@ -1,12 +0,0 @@ -@ECHO OFF - -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-axios -c bin\typescript-axios-petstore-target-es6.json -o samples\client\petstore\typescript-axios\builds\es6-target - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-axios-petstore-with-complex-headers.bat b/bin/windows/typescript-axios-petstore-with-complex-headers.bat deleted file mode 100755 index 9cf113587e..0000000000 --- a/bin/windows/typescript-axios-petstore-with-complex-headers.bat +++ /dev/null @@ -1,12 +0,0 @@ -@ECHO OFF - -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\3_0\petstore-with-complex-headers.yaml -g typescript-axios -o samples\client\petstore\typescript-axios\builds\with-complex-headers - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-axios-petstore-with-npm-version-and-separate-models-and-api.bat b/bin/windows/typescript-axios-petstore-with-npm-version-and-separate-models-and-api.bat deleted file mode 100644 index d67cc90b5b..0000000000 --- a/bin/windows/typescript-axios-petstore-with-npm-version-and-separate-models-and-api.bat +++ /dev/null @@ -1,12 +0,0 @@ -@ECHO OFF - -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-axios -c bin\typescript-axios-petstore-with-npm-version-and-separate-models-and-api.json -o samples\client\petstore\typescript-axios\builds\with-npm-version-and-separate-models-and-api - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-axios-petstore-with-npm-version.bat b/bin/windows/typescript-axios-petstore-with-npm-version.bat deleted file mode 100644 index a3ae2644e9..0000000000 --- a/bin/windows/typescript-axios-petstore-with-npm-version.bat +++ /dev/null @@ -1,12 +0,0 @@ -@ECHO OFF - -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-axios -c bin\typescript-axios-petstore-with-npm-version.json -o samples\client\petstore\typescript-axios\builds\with-npm-version - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-axios-petstore-with-single-request-parameters.bat b/bin/windows/typescript-axios-petstore-with-single-request-parameters.bat deleted file mode 100755 index efe0284cb8..0000000000 --- a/bin/windows/typescript-axios-petstore-with-single-request-parameters.bat +++ /dev/null @@ -1,12 +0,0 @@ -@ECHO OFF - -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-operations-without-required-params.yaml -g typescript-axios -o samples\client\petstore\typescript-axios\builds\with-single-request-parameters --additional-properties useSingleRequestParameter=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-axios-petstore.bat b/bin/windows/typescript-axios-petstore.bat deleted file mode 100644 index 7b21e6b66e..0000000000 --- a/bin/windows/typescript-axios-petstore.bat +++ /dev/null @@ -1,14 +0,0 @@ -@ECHO OFF - -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 - -echo -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-axios -o samples\client\petstore\typescript-axios\builds\default - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-fetch-petstore-all.bat b/bin/windows/typescript-fetch-petstore-all.bat deleted file mode 100644 index d525bc0559..0000000000 --- a/bin/windows/typescript-fetch-petstore-all.bat +++ /dev/null @@ -1,9 +0,0 @@ -@ECHO OFF - -call bin\windows\typescript-fetch-petstore.bat -call bin\windows\typescript-fetch-petstore-target-es6.bat -call bin\windows\typescript-fetch-petstore-with-npm-version.bat -call bin\windows\typescript-fetch-petstore-interfaces.bat -call bin\windows\typescript-fetch-petstore-multiple-parameters.bat -call bin\windows\typescript-fetch-petstore-prefix-parameter-interfaces.bat -call bin\windows\typescript-fetch-petstore-typescript-three-plus.bat \ No newline at end of file diff --git a/bin/windows/typescript-fetch-petstore-interfaces.bat b/bin/windows/typescript-fetch-petstore-interfaces.bat deleted file mode 100644 index e25d23badb..0000000000 --- a/bin/windows/typescript-fetch-petstore-interfaces.bat +++ /dev/null @@ -1,12 +0,0 @@ -@ECHO OFF - -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-fetch -o samples\client\petstore\typescript-fetch\builds\with-interfaces --additional-properties withInterfaces=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-fetch-petstore-multiple-parameters.bat b/bin/windows/typescript-fetch-petstore-multiple-parameters.bat deleted file mode 100644 index 095fdb3e5d..0000000000 --- a/bin/windows/typescript-fetch-petstore-multiple-parameters.bat +++ /dev/null @@ -1,12 +0,0 @@ -@ECHO OFF - -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-fetch -c bin\typescript-fetch-petstore-multiple-parameters.json -o samples\client\petstore\typescript-fetch\builds\multiple-parameters - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-fetch-petstore-prefix-parameter-interfaces.bat b/bin/windows/typescript-fetch-petstore-prefix-parameter-interfaces.bat deleted file mode 100644 index f96184e5d2..0000000000 --- a/bin/windows/typescript-fetch-petstore-prefix-parameter-interfaces.bat +++ /dev/null @@ -1,12 +0,0 @@ -@ECHO OFF - -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-fetch -c bin\typescript-fetch-petstore-prefix-parameter-interfaces.json -o samples\client\petstore\typescript-fetch\builds\prefix-parameter-interfaces - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-fetch-petstore-target-es6.bat b/bin/windows/typescript-fetch-petstore-target-es6.bat deleted file mode 100644 index afa259575f..0000000000 --- a/bin/windows/typescript-fetch-petstore-target-es6.bat +++ /dev/null @@ -1,12 +0,0 @@ -@ECHO OFF - -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-fetch -c bin\typescript-fetch-petstore-target-es6.json -o samples\client\petstore\typescript-fetch\builds\es6-target - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-fetch-petstore-typescript-three-plus.bat b/bin/windows/typescript-fetch-petstore-typescript-three-plus.bat deleted file mode 100644 index 001a75f298..0000000000 --- a/bin/windows/typescript-fetch-petstore-typescript-three-plus.bat +++ /dev/null @@ -1,12 +0,0 @@ -@ECHO OFF - -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-fetch -c bin/typescript-fetch-petstore-typescript-three-plus.json -o samples\client\petstore\typescript-fetch\builds\typescript-three-plus - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-fetch-petstore-with-npm-version.bat b/bin/windows/typescript-fetch-petstore-with-npm-version.bat deleted file mode 100644 index dc0331d9ce..0000000000 --- a/bin/windows/typescript-fetch-petstore-with-npm-version.bat +++ /dev/null @@ -1,12 +0,0 @@ -@ECHO OFF - -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-fetch -c bin\typescript-fetch-petstore-with-npm-version.json -o samples\client\petstore\typescript-fetch\builds\with-npm-version - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-fetch-petstore.bat b/bin/windows/typescript-fetch-petstore.bat deleted file mode 100644 index b08fa66d0d..0000000000 --- a/bin/windows/typescript-fetch-petstore.bat +++ /dev/null @@ -1,14 +0,0 @@ -@ECHO OFF - -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 - -echo -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-fetch -o samples\client\petstore\typescript-fetch\builds\default - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-inversify-petstore.bat b/bin/windows/typescript-inversify-petstore.bat deleted file mode 100644 index e29c0dda78..0000000000 --- a/bin/windows/typescript-inversify-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.yaml -g typescript-inversify -o samples\client\petstore\typescript-inversify - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-jquery-with-npm.bat b/bin/windows/typescript-jquery-with-npm.bat deleted file mode 100644 index a72a03b541..0000000000 --- a/bin/windows/typescript-jquery-with-npm.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -c bin\typescript-jquery-petstore-npm.json -g typescript-jquery -o samples\client\petstore\typescript-jquery\npm - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-jquery.bat b/bin/windows/typescript-jquery.bat deleted file mode 100644 index d92ab3800f..0000000000 --- a/bin/windows/typescript-jquery.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-jquery -o samples\client\petstore\typescript-jquery\default - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-node-petstore-all.bat b/bin/windows/typescript-node-petstore-all.bat deleted file mode 100644 index 3a690974e9..0000000000 --- a/bin/windows/typescript-node-petstore-all.bat +++ /dev/null @@ -1,2 +0,0 @@ -call .\bin\windows\typescript-node-petstore.bat -call .\bin\windows\typescript-node-petstore-with-npm.bat diff --git a/bin/windows/typescript-node-petstore-with-npm.bat b/bin/windows/typescript-node-petstore-with-npm.bat deleted file mode 100755 index 6f0a62e708..0000000000 --- a/bin/windows/typescript-node-petstore-with-npm.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -c bin\typescript-node-petstore-npm.json -g typescript-node -o samples\client\petstore\typescript-node\npm - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-node-petstore.bat b/bin/windows/typescript-node-petstore.bat deleted file mode 100755 index e2df9d5dd6..0000000000 --- a/bin/windows/typescript-node-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.yaml -g typescript-node -o samples\client\petstore\typescript-node\default - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-redux-query-petstore-with-npm.bat b/bin/windows/typescript-redux-query-petstore-with-npm.bat deleted file mode 100755 index 7ec9a26202..0000000000 --- a/bin/windows/typescript-redux-query-petstore-with-npm.bat +++ /dev/null @@ -1,10 +0,0 @@ -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -c bin\typescript-redux-query-petstore-with-npm-version.json -g typescript-redux-query -o samples\client\petstore\typescript-redux-query\builds\with-npm-version - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-redux-query-petstore.bat b/bin/windows/typescript-redux-query-petstore.bat deleted file mode 100644 index 560fe91966..0000000000 --- a/bin/windows/typescript-redux-query-petstore.bat +++ /dev/null @@ -1,14 +0,0 @@ -@ECHO OFF - -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 - -echo -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-redux-query -o samples\client\petstore\typescript-redux-query\builds\default - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-rxjs-petstore-all.bat b/bin/windows/typescript-rxjs-petstore-all.bat deleted file mode 100644 index d86cf0d574..0000000000 --- a/bin/windows/typescript-rxjs-petstore-all.bat +++ /dev/null @@ -1,6 +0,0 @@ -@ECHO OFF - -call bin\windows\typescript-rxjs-petstore.bat -call bin\windows\typescript-rxjs-petstore-target-es6.bat -call bin\windows\typescript-rxjs-petstore-with-npm-version.bat -call bin\windows\typescript-rxjs-petstore-interfaces.bat diff --git a/bin/windows/typescript-rxjs-petstore-interfaces.bat b/bin/windows/typescript-rxjs-petstore-interfaces.bat deleted file mode 100644 index b2232e82cd..0000000000 --- a/bin/windows/typescript-rxjs-petstore-interfaces.bat +++ /dev/null @@ -1,12 +0,0 @@ -@ECHO OFF - -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-rxjs -o samples\client\petstore\typescript-rxjs\builds\with-interfaces --additional-properties withInterfaces=true - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-rxjs-petstore-target-es6.bat b/bin/windows/typescript-rxjs-petstore-target-es6.bat deleted file mode 100644 index 7a7151fdc3..0000000000 --- a/bin/windows/typescript-rxjs-petstore-target-es6.bat +++ /dev/null @@ -1,12 +0,0 @@ -@ECHO OFF - -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-rxjs -c bin\typescript-rxjs-petstore-target-es6.json -o samples\client\petstore\typescript-rxjs\builds\es6-target - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-rxjs-petstore-with-npm-version.bat b/bin/windows/typescript-rxjs-petstore-with-npm-version.bat deleted file mode 100644 index 2bd3875d73..0000000000 --- a/bin/windows/typescript-rxjs-petstore-with-npm-version.bat +++ /dev/null @@ -1,12 +0,0 @@ -@ECHO OFF - -set executable=.\modules\openapi-generator-cli\target\openapi-generator-cli.jar - -If Not Exist %executable% ( - mvn clean package -) - -REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-rxjs -c bin\typescript-rxjs-petstore-with-npm-version.json -o samples\client\petstore\typescript-rxjs\builds\with-npm-version - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/typescript-rxjs-petstore.bat b/bin/windows/typescript-rxjs-petstore.bat deleted file mode 100644 index 025b967add..0000000000 --- a/bin/windows/typescript-rxjs-petstore.bat +++ /dev/null @@ -1,14 +0,0 @@ -@ECHO OFF - -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 - -echo -set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -g typescript-rxjs -o samples\client\petstore\typescript-rxjs\builds\default - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/bin/windows/ze-ph-petstore.bat b/bin/windows/ze-ph-petstore.bat deleted file mode 100644 index da5eacc363..0000000000 --- a/bin/windows/ze-ph-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 php-ze-ph -o samples\server\petstore\php-ze-ph - -java %JAVA_OPTS% -jar %executable% %ags% diff --git a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/GenerateBatch.java b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/GenerateBatch.java index 90bdec1f3f..1e9a4dbb24 100644 --- a/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/GenerateBatch.java +++ b/modules/openapi-generator-cli/src/main/java/org/openapitools/codegen/cmd/GenerateBatch.java @@ -28,6 +28,7 @@ import com.fasterxml.jackson.databind.node.ObjectNode; import io.airlift.airline.Arguments; import io.airlift.airline.Command; import io.airlift.airline.Option; +import org.apache.commons.lang3.StringUtils; import org.openapitools.codegen.ClientOptInput; import org.openapitools.codegen.CodegenConfig; import org.openapitools.codegen.DefaultGenerator; @@ -47,13 +48,15 @@ import java.util.Locale; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicInteger; import java.util.stream.Collectors; import java.util.stream.Stream; @SuppressWarnings({"unused", "MismatchedQueryAndUpdateOfCollection", "java:S106"}) @Command(name = "batch", description = "Generate code in batch via external configs.", hidden = true) public class GenerateBatch extends OpenApiGeneratorCommand { - + private static AtomicInteger failures = new AtomicInteger(0); + private static AtomicInteger successes = new AtomicInteger(0); private static final Logger LOGGER = LoggerFactory.getLogger(GenerateBatch.class); @Option(name = {"-v", "--verbose"}, description = "verbose mode") @@ -151,7 +154,13 @@ public class GenerateBatch extends OpenApiGeneratorCommand { executor.awaitTermination(awaitFor, TimeUnit.MINUTES); - System.out.println("COMPLETE."); + int failCount = failures.intValue(); + if (failCount > 0) { + System.err.println(String.format(Locale.ROOT, "[FAIL] Completed with %d failures, %d successes", failCount, successes.intValue())); + System.exit(1); + } else { + System.out.println(String.format(Locale.ROOT, "[SUCCESS] Batch generation finished %d generators successfully.", successes.intValue())); + } } catch (InterruptedException e) { e.printStackTrace(); // re-interrupt @@ -183,12 +192,13 @@ public class GenerateBatch extends OpenApiGeneratorCommand { */ @Override public void run() { + String name = ""; try { GlobalSettings.reset(); ClientOptInput opts = configurator.toClientOptInput(); CodegenConfig config = opts.getConfig(); - String name = config.getName(); + name = config.getName(); Path target = Paths.get(config.getOutputDir()); Path updated = rootDir.resolve(target); @@ -202,8 +212,14 @@ public class GenerateBatch extends OpenApiGeneratorCommand { defaultGenerator.generate(); System.out.printf(Locale.ROOT, "[%s] Finished generating %s…%n", Thread.currentThread().getName(), name); + successes.incrementAndGet(); } catch (Throwable e) { - System.err.printf(Locale.ROOT, "[%s] Generation failed: (%s) %s%n", Thread.currentThread().getName(), e.getClass().getSimpleName(), e.getMessage()); + failures.incrementAndGet(); + String failedOn = name; + if (StringUtils.isEmpty(failedOn)) { + failedOn = "unspecified"; + } + System.err.printf(Locale.ROOT, "[%s] Generation failed for %s: (%s) %s%n", Thread.currentThread().getName(), failedOn, e.getClass().getSimpleName(), e.getMessage()); e.printStackTrace(System.err); if (exitOnError) { System.exit(1); diff --git a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java index c7a49db52a..61516ec694 100644 --- a/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java +++ b/modules/openapi-generator-core/src/main/java/org/openapitools/codegen/config/WorkflowSettings.java @@ -46,6 +46,7 @@ public class WorkflowSettings { public static final boolean DEFAULT_ENABLE_POST_PROCESS_FILE = false; public static final boolean DEFAULT_ENABLE_MINIMAL_UPDATE = false; public static final boolean DEFAULT_STRICT_SPEC_BEHAVIOR = true; + public static final boolean DEFAULT_GENERATE_ALIAS_AS_MODEL = false; public static final String DEFAULT_TEMPLATING_ENGINE_NAME = "mustache"; public static final ImmutableMap DEFAULT_GLOBAL_PROPERTIES = ImmutableMap.of(); @@ -59,6 +60,7 @@ public class WorkflowSettings { private boolean enablePostProcessFile = DEFAULT_ENABLE_POST_PROCESS_FILE; private boolean enableMinimalUpdate = DEFAULT_ENABLE_MINIMAL_UPDATE; private boolean strictSpecBehavior = DEFAULT_STRICT_SPEC_BEHAVIOR; + private boolean generateAliasAsModel = DEFAULT_GENERATE_ALIAS_AS_MODEL; private String templateDir; private String templatingEngineName = DEFAULT_TEMPLATING_ENGINE_NAME; private String ignoreFileOverride; @@ -79,6 +81,7 @@ public class WorkflowSettings { this.templatingEngineName = builder.templatingEngineName; this.ignoreFileOverride = builder.ignoreFileOverride; this.globalProperties = ImmutableMap.copyOf(builder.globalProperties); + this.generateAliasAsModel = builder.generateAliasAsModel; } /** @@ -104,6 +107,7 @@ public class WorkflowSettings { builder.validateSpec = copy.isValidateSpec(); builder.enablePostProcessFile = copy.isEnablePostProcessFile(); builder.enableMinimalUpdate = copy.isEnableMinimalUpdate(); + builder.generateAliasAsModel = copy.isGenerateAliasAsModel(); builder.strictSpecBehavior = copy.isStrictSpecBehavior(); builder.templatingEngineName = copy.getTemplatingEngineName(); builder.ignoreFileOverride = copy.getIgnoreFileOverride(); @@ -212,6 +216,15 @@ public class WorkflowSettings { return enableMinimalUpdate; } + /** + * Indicates whether or not the generation should convert aliases (primitives defined as schema for use within documents) as models. + * + * @return true if generate-alias-as-model is enabled, otherwise false. + */ + public boolean isGenerateAliasAsModel() { + return generateAliasAsModel; + } + /** * Indicates whether or not 'MUST' and 'SHALL' wording in the api specification is strictly adhered to. * For example, when false, no automatic 'fixes' will be applied to documents which pass validation but don't follow the spec. @@ -275,6 +288,7 @@ public class WorkflowSettings { private Boolean enablePostProcessFile = DEFAULT_ENABLE_POST_PROCESS_FILE; private Boolean enableMinimalUpdate = DEFAULT_ENABLE_MINIMAL_UPDATE; private Boolean strictSpecBehavior = DEFAULT_STRICT_SPEC_BEHAVIOR; + private Boolean generateAliasAsModel = DEFAULT_GENERATE_ALIAS_AS_MODEL; private String templateDir; private String templatingEngineName = DEFAULT_TEMPLATING_ENGINE_NAME; private String ignoreFileOverride; @@ -402,6 +416,18 @@ public class WorkflowSettings { return this; } + /** + * Sets the {@code generateAliasAsModel} and returns a reference to this Builder so that the methods can be chained together. + * An 'alias' is a primitive type defined as a schema, and this option will attempt to construct a model for that primitive. + * + * @param generateAliasAsModel the {@code generateAliasAsModel} to set + * @return a reference to this Builder + */ + public Builder withGenerateAliasAsModel(Boolean generateAliasAsModel) { + this.generateAliasAsModel = generateAliasAsModel != null ? generateAliasAsModel : Boolean.valueOf(DEFAULT_GENERATE_ALIAS_AS_MODEL); + return this; + } + /** * Sets the {@code templateDir} and returns a reference to this Builder so that the methods can be chained together. * @@ -519,6 +545,7 @@ public class WorkflowSettings { ", templatingEngineName='" + templatingEngineName + '\'' + ", ignoreFileOverride='" + ignoreFileOverride + '\'' + ", globalProperties=" + globalProperties + + ", generateAliasAsModel=" + generateAliasAsModel + '}'; } @@ -535,6 +562,7 @@ public class WorkflowSettings { isEnablePostProcessFile() == that.isEnablePostProcessFile() && isEnableMinimalUpdate() == that.isEnableMinimalUpdate() && isStrictSpecBehavior() == that.isStrictSpecBehavior() && + isGenerateAliasAsModel() == that.isGenerateAliasAsModel() && Objects.equals(getInputSpec(), that.getInputSpec()) && Objects.equals(getOutputDir(), that.getOutputDir()) && Objects.equals(getTemplateDir(), that.getTemplateDir()) && @@ -553,6 +581,7 @@ public class WorkflowSettings { isRemoveOperationIdPrefix(), isLogToStderr(), isValidateSpec(), + isGenerateAliasAsModel(), isEnablePostProcessFile(), isEnableMinimalUpdate(), isStrictSpecBehavior(), diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java index 8520b60533..ddb41ce7b8 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java @@ -28,6 +28,7 @@ import io.swagger.v3.parser.core.models.AuthorizationValue; import io.swagger.v3.parser.core.models.ParseOptions; import io.swagger.v3.parser.core.models.SwaggerParseResult; import org.apache.commons.io.FilenameUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Validate; import org.openapitools.codegen.*; import org.openapitools.codegen.api.TemplatingEngineAdapter; @@ -214,21 +215,31 @@ public class CodegenConfigurator { } public CodegenConfigurator setApiPackage(String apiPackage) { + if (StringUtils.isNotEmpty(apiPackage)) { + addAdditionalProperty(CodegenConstants.API_PACKAGE, apiPackage); + } generatorSettingsBuilder.withApiPackage(apiPackage); return this; } public CodegenConfigurator setArtifactId(String artifactId) { + if (StringUtils.isNotEmpty(artifactId)) { + addAdditionalProperty(CodegenConstants.ARTIFACT_ID, artifactId); + } generatorSettingsBuilder.withArtifactId(artifactId); return this; } public CodegenConfigurator setArtifactVersion(String artifactVersion) { + if (StringUtils.isNotEmpty(artifactVersion)) { + addAdditionalProperty(CodegenConstants.ARTIFACT_VERSION, artifactVersion); + } generatorSettingsBuilder.withArtifactVersion(artifactVersion); return this; } public CodegenConfigurator setAuth(String auth) { + // do not cache this in additional properties. this.auth = auth; return this; } @@ -244,7 +255,7 @@ public class CodegenConfigurator { } public CodegenConfigurator setGenerateAliasAsModel(boolean generateAliasAsModel) { - // TODO: Move to GlobalSettings? + workflowSettingsBuilder.withGenerateAliasAsModel(generateAliasAsModel); ModelUtils.setGenerateAliasAsModel(generateAliasAsModel); return this; } @@ -265,26 +276,41 @@ public class CodegenConfigurator { } public CodegenConfigurator setGitRepoId(String gitRepoId) { + if (StringUtils.isNotEmpty(gitRepoId)) { + addAdditionalProperty(CodegenConstants.GIT_REPO_ID, gitRepoId); + } generatorSettingsBuilder.withGitRepoId(gitRepoId); return this; } public CodegenConfigurator setGitHost(String gitHost) { + if (StringUtils.isNotEmpty(gitHost)) { + addAdditionalProperty(CodegenConstants.GIT_HOST, gitHost); + } generatorSettingsBuilder.withGitHost(gitHost); return this; } public CodegenConfigurator setGitUserId(String gitUserId) { + if (StringUtils.isNotEmpty(gitUserId)) { + addAdditionalProperty(CodegenConstants.GIT_HOST, gitUserId); + } generatorSettingsBuilder.withGitUserId(gitUserId); return this; } public CodegenConfigurator setGroupId(String groupId) { + if (StringUtils.isNotEmpty(groupId)) { + addAdditionalProperty(CodegenConstants.GROUP_ID, groupId); + } generatorSettingsBuilder.withGroupId(groupId); return this; } public CodegenConfigurator setHttpUserAgent(String httpUserAgent) { + if (StringUtils.isNotEmpty(httpUserAgent)) { + addAdditionalProperty(CodegenConstants.HTTP_USER_AGENT, httpUserAgent); + } generatorSettingsBuilder.withHttpUserAgent(httpUserAgent); return this; } @@ -313,6 +339,9 @@ public class CodegenConfigurator { } public CodegenConfigurator setInvokerPackage(String invokerPackage) { + if (StringUtils.isNotEmpty(invokerPackage)) { + addAdditionalProperty(CodegenConstants.INVOKER_PACKAGE, invokerPackage); + } generatorSettingsBuilder.withInvokerPackage(invokerPackage); return this; } @@ -335,21 +364,33 @@ public class CodegenConfigurator { } public CodegenConfigurator setApiNameSuffix(String suffix) { + if (StringUtils.isNotEmpty(suffix)) { + addAdditionalProperty(CodegenConstants.API_NAME_SUFFIX, suffix); + } generatorSettingsBuilder.withApiNameSuffix(suffix); return this; } public CodegenConfigurator setModelNamePrefix(String prefix) { + if (StringUtils.isNotEmpty(prefix)) { + addAdditionalProperty(CodegenConstants.MODEL_NAME_PREFIX, prefix); + } generatorSettingsBuilder.withModelNamePrefix(prefix); return this; } public CodegenConfigurator setModelNameSuffix(String suffix) { + if (StringUtils.isNotEmpty(suffix)) { + addAdditionalProperty(CodegenConstants.MODEL_NAME_SUFFIX, suffix); + } generatorSettingsBuilder.withModelNameSuffix(suffix); return this; } public CodegenConfigurator setModelPackage(String modelPackage) { + if (StringUtils.isNotEmpty(modelPackage)) { + addAdditionalProperty(CodegenConstants.MODEL_PACKAGE, modelPackage); + } generatorSettingsBuilder.withModelPackage(modelPackage); return this; } @@ -360,11 +401,17 @@ public class CodegenConfigurator { } public CodegenConfigurator setPackageName(String packageName) { + if (StringUtils.isNotEmpty(packageName)) { + addAdditionalProperty(CodegenConstants.PACKAGE_NAME, packageName); + } generatorSettingsBuilder.withPackageName(packageName); return this; } public CodegenConfigurator setReleaseNote(String releaseNote) { + if (StringUtils.isNotEmpty(releaseNote)) { + addAdditionalProperty(CodegenConstants.RELEASE_NOTE, releaseNote); + } generatorSettingsBuilder.withReleaseNote(releaseNote); return this; } @@ -453,6 +500,9 @@ public class CodegenConfigurator { GlobalSettings.setProperty(entry.getKey(), entry.getValue()); } + // if caller resets GlobalSettings, we'll need to reset generateAliasAsModel. As noted in this method, this should be moved. + ModelUtils.setGenerateAliasAsModel(workflowSettings.isGenerateAliasAsModel()); + // TODO: Support custom spec loader implementations (https://github.com/OpenAPITools/openapi-generator/issues/844) final List authorizationValues = AuthParser.parse(this.auth); ParseOptions options = new ParseOptions(); diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java index 0afb3603c5..0b41c204d4 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractJavaCodegen.java @@ -37,7 +37,9 @@ import org.slf4j.LoggerFactory; import java.io.File; import java.time.LocalDate; +import java.time.OffsetDateTime; import java.time.ZoneId; +import java.time.format.DateTimeFormatter; import java.util.*; import java.util.regex.Pattern; diff --git a/modules/openapi-generator/src/test/resources/3_0/elm.yaml b/modules/openapi-generator/src/test/resources/3_0/elm.yaml index ae5288715c..13dde8a983 100644 --- a/modules/openapi-generator/src/test/resources/3_0/elm.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/elm.yaml @@ -64,17 +64,17 @@ paths: parameters: - name: string in: path - required: true + required: true schema: type: string - name: integer in: path - required: true + required: true schema: type: integer - name: enumeration in: path - required: true + required: true schema: type: string enum: [a, b, c] diff --git a/samples/client/petstore/apex/.openapi-generator/FILES b/samples/client/petstore/apex/.openapi-generator/FILES index 11fd3bc07b..dd1183e235 100644 --- a/samples/client/petstore/apex/.openapi-generator/FILES +++ b/samples/client/petstore/apex/.openapi-generator/FILES @@ -8,6 +8,10 @@ force-app/main/default/classes/OASCategory.cls force-app/main/default/classes/OASCategory.cls-meta.xml force-app/main/default/classes/OASClient.cls force-app/main/default/classes/OASClient.cls-meta.xml +force-app/main/default/classes/OASInlineObject.cls +force-app/main/default/classes/OASInlineObject.cls-meta.xml +force-app/main/default/classes/OASInlineObject1.cls +force-app/main/default/classes/OASInlineObject1.cls-meta.xml force-app/main/default/classes/OASOrder.cls force-app/main/default/classes/OASOrder.cls-meta.xml force-app/main/default/classes/OASPet.cls diff --git a/samples/client/petstore/apex/README.md b/samples/client/petstore/apex/README.md index 60da087e3f..3a22819780 100644 --- a/samples/client/petstore/apex/README.md +++ b/samples/client/petstore/apex/README.md @@ -91,6 +91,8 @@ Class | Method | HTTP request | Description - [OASApiResponse](OASApiResponse.md) - [OASCategory](OASCategory.md) + - [OASInlineObject](OASInlineObject.md) + - [OASInlineObject1](OASInlineObject1.md) - [OASOrder](OASOrder.md) - [OASPet](OASPet.md) - [OASTag](OASTag.md) diff --git a/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject.cls b/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject.cls new file mode 100644 index 0000000000..904594a557 --- /dev/null +++ b/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject.cls @@ -0,0 +1,52 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by the OAS code generator program. + * https://github.com/OpenAPITools/openapi-generator + * Do not edit the class manually. + */ + +/** + * OASInlineObject + */ +public class OASInlineObject { + /** + * Updated name of the pet + * @return name + */ + public String name { get; set; } + + /** + * Updated status of the pet + * @return status + */ + public String status { get; set; } + + public static OASInlineObject getExample() { + OASInlineObject inlineObject = new OASInlineObject(); + inlineObject.name = ''; + inlineObject.status = ''; + return inlineObject; + } + + public Boolean equals(Object obj) { + if (obj instanceof OASInlineObject) { + OASInlineObject inlineObject = (OASInlineObject) obj; + return this.name == inlineObject.name + && this.status == inlineObject.status; + } + return false; + } + + public Integer hashCode() { + Integer hashCode = 43; + hashCode = (17 * hashCode) + (name == null ? 0 : System.hashCode(name)); + hashCode = (17 * hashCode) + (status == null ? 0 : System.hashCode(status)); + return hashCode; + } +} + diff --git a/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject.cls-meta.xml b/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject.cls-meta.xml new file mode 100644 index 0000000000..fec71a2669 --- /dev/null +++ b/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject.cls-meta.xml @@ -0,0 +1,5 @@ + + + 42.0 + Active + diff --git a/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject1.cls b/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject1.cls new file mode 100644 index 0000000000..f55bd1c571 --- /dev/null +++ b/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject1.cls @@ -0,0 +1,52 @@ +/* + * OpenAPI Petstore + * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by the OAS code generator program. + * https://github.com/OpenAPITools/openapi-generator + * Do not edit the class manually. + */ + +/** + * OASInlineObject1 + */ +public class OASInlineObject1 { + /** + * Additional data to pass to server + * @return additionalMetadata + */ + public String additionalMetadata { get; set; } + + /** + * file to upload + * @return file + */ + public Blob file { get; set; } + + public static OASInlineObject1 getExample() { + OASInlineObject1 inlineObject1 = new OASInlineObject1(); + inlineObject1.additionalMetadata = ''; + inlineObject1.file = EncodingUtil.base64Decode(VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2cu); + return inlineObject1; + } + + public Boolean equals(Object obj) { + if (obj instanceof OASInlineObject1) { + OASInlineObject1 inlineObject1 = (OASInlineObject1) obj; + return this.additionalMetadata == inlineObject1.additionalMetadata + && this.file == inlineObject1.file; + } + return false; + } + + public Integer hashCode() { + Integer hashCode = 43; + hashCode = (17 * hashCode) + (additionalMetadata == null ? 0 : System.hashCode(additionalMetadata)); + hashCode = (17 * hashCode) + (file == null ? 0 : System.hashCode(file)); + return hashCode; + } +} + diff --git a/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject1.cls-meta.xml b/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject1.cls-meta.xml new file mode 100644 index 0000000000..fec71a2669 --- /dev/null +++ b/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject1.cls-meta.xml @@ -0,0 +1,5 @@ + + + 42.0 + Active + diff --git a/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject1Test.cls b/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject1Test.cls new file mode 100644 index 0000000000..31c06fadba --- /dev/null +++ b/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject1Test.cls @@ -0,0 +1,71 @@ +@isTest +private class OASInlineObject1Test { + @isTest + private static void equalsSameInstance() { + OASInlineObject1 inlineObject11 = OASInlineObject1.getExample(); + OASInlineObject1 inlineObject12 = inlineObject11; + OASInlineObject1 inlineObject13 = new OASInlineObject1(); + OASInlineObject1 inlineObject14 = inlineObject13; + + System.assert(inlineObject11.equals(inlineObject12)); + System.assert(inlineObject12.equals(inlineObject11)); + System.assert(inlineObject11.equals(inlineObject11)); + System.assert(inlineObject13.equals(inlineObject14)); + System.assert(inlineObject14.equals(inlineObject13)); + System.assert(inlineObject13.equals(inlineObject13)); + } + + @isTest + private static void equalsIdenticalInstance() { + OASInlineObject1 inlineObject11 = OASInlineObject1.getExample(); + OASInlineObject1 inlineObject12 = OASInlineObject1.getExample(); + OASInlineObject1 inlineObject13 = new OASInlineObject1(); + OASInlineObject1 inlineObject14 = new OASInlineObject1(); + + System.assert(inlineObject11.equals(inlineObject12)); + System.assert(inlineObject12.equals(inlineObject11)); + System.assert(inlineObject13.equals(inlineObject14)); + System.assert(inlineObject14.equals(inlineObject13)); + } + + @isTest + private static void notEqualsDifferentType() { + OASInlineObject1 inlineObject11 = OASInlineObject1.getExample(); + OASInlineObject1 inlineObject12 = new OASInlineObject1(); + + System.assertEquals(false, inlineObject11.equals('foo')); + System.assertEquals(false, inlineObject12.equals('foo')); + } + + @isTest + private static void notEqualsNull() { + OASInlineObject1 inlineObject11 = OASInlineObject1.getExample(); + OASInlineObject1 inlineObject12 = new OASInlineObject1(); + OASInlineObject1 inlineObject13; + + System.assertEquals(false, inlineObject11.equals(inlineObject13)); + System.assertEquals(false, inlineObject12.equals(inlineObject13)); + } + + @isTest + private static void consistentHashCodeValue() { + OASInlineObject1 inlineObject11 = OASInlineObject1.getExample(); + OASInlineObject1 inlineObject12 = new OASInlineObject1(); + + System.assertEquals(inlineObject11.hashCode(), inlineObject11.hashCode()); + System.assertEquals(inlineObject12.hashCode(), inlineObject12.hashCode()); + } + + @isTest + private static void equalInstancesHaveSameHashCode() { + OASInlineObject1 inlineObject11 = OASInlineObject1.getExample(); + OASInlineObject1 inlineObject12 = OASInlineObject1.getExample(); + OASInlineObject1 inlineObject13 = new OASInlineObject1(); + OASInlineObject1 inlineObject14 = new OASInlineObject1(); + + System.assert(inlineObject11.equals(inlineObject12)); + System.assert(inlineObject13.equals(inlineObject14)); + System.assertEquals(inlineObject11.hashCode(), inlineObject12.hashCode()); + System.assertEquals(inlineObject13.hashCode(), inlineObject14.hashCode()); + } +} diff --git a/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject1Test.cls-meta.xml b/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject1Test.cls-meta.xml new file mode 100644 index 0000000000..fec71a2669 --- /dev/null +++ b/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObject1Test.cls-meta.xml @@ -0,0 +1,5 @@ + + + 42.0 + Active + diff --git a/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObjectTest.cls b/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObjectTest.cls new file mode 100644 index 0000000000..a93b4a228e --- /dev/null +++ b/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObjectTest.cls @@ -0,0 +1,71 @@ +@isTest +private class OASInlineObjectTest { + @isTest + private static void equalsSameInstance() { + OASInlineObject inlineObject1 = OASInlineObject.getExample(); + OASInlineObject inlineObject2 = inlineObject1; + OASInlineObject inlineObject3 = new OASInlineObject(); + OASInlineObject inlineObject4 = inlineObject3; + + System.assert(inlineObject1.equals(inlineObject2)); + System.assert(inlineObject2.equals(inlineObject1)); + System.assert(inlineObject1.equals(inlineObject1)); + System.assert(inlineObject3.equals(inlineObject4)); + System.assert(inlineObject4.equals(inlineObject3)); + System.assert(inlineObject3.equals(inlineObject3)); + } + + @isTest + private static void equalsIdenticalInstance() { + OASInlineObject inlineObject1 = OASInlineObject.getExample(); + OASInlineObject inlineObject2 = OASInlineObject.getExample(); + OASInlineObject inlineObject3 = new OASInlineObject(); + OASInlineObject inlineObject4 = new OASInlineObject(); + + System.assert(inlineObject1.equals(inlineObject2)); + System.assert(inlineObject2.equals(inlineObject1)); + System.assert(inlineObject3.equals(inlineObject4)); + System.assert(inlineObject4.equals(inlineObject3)); + } + + @isTest + private static void notEqualsDifferentType() { + OASInlineObject inlineObject1 = OASInlineObject.getExample(); + OASInlineObject inlineObject2 = new OASInlineObject(); + + System.assertEquals(false, inlineObject1.equals('foo')); + System.assertEquals(false, inlineObject2.equals('foo')); + } + + @isTest + private static void notEqualsNull() { + OASInlineObject inlineObject1 = OASInlineObject.getExample(); + OASInlineObject inlineObject2 = new OASInlineObject(); + OASInlineObject inlineObject3; + + System.assertEquals(false, inlineObject1.equals(inlineObject3)); + System.assertEquals(false, inlineObject2.equals(inlineObject3)); + } + + @isTest + private static void consistentHashCodeValue() { + OASInlineObject inlineObject1 = OASInlineObject.getExample(); + OASInlineObject inlineObject2 = new OASInlineObject(); + + System.assertEquals(inlineObject1.hashCode(), inlineObject1.hashCode()); + System.assertEquals(inlineObject2.hashCode(), inlineObject2.hashCode()); + } + + @isTest + private static void equalInstancesHaveSameHashCode() { + OASInlineObject inlineObject1 = OASInlineObject.getExample(); + OASInlineObject inlineObject2 = OASInlineObject.getExample(); + OASInlineObject inlineObject3 = new OASInlineObject(); + OASInlineObject inlineObject4 = new OASInlineObject(); + + System.assert(inlineObject1.equals(inlineObject2)); + System.assert(inlineObject3.equals(inlineObject4)); + System.assertEquals(inlineObject1.hashCode(), inlineObject2.hashCode()); + System.assertEquals(inlineObject3.hashCode(), inlineObject4.hashCode()); + } +} diff --git a/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObjectTest.cls-meta.xml b/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObjectTest.cls-meta.xml new file mode 100644 index 0000000000..fec71a2669 --- /dev/null +++ b/samples/client/petstore/apex/force-app/main/default/classes/OASInlineObjectTest.cls-meta.xml @@ -0,0 +1,5 @@ + + + 42.0 + Active + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator-ignore b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator-ignore index e7a7363b75..d323263b54 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator-ignore +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator-ignore @@ -1,25 +1,4 @@ # 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 - +# This test file has changes required for testing and should not be overwritten src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator-ignore b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator-ignore index e7a7363b75..9e4fc92023 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator-ignore +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator-ignore @@ -1,25 +1,4 @@ # 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 - +# This project file holds config used in "live" testing src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj + diff --git a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator-ignore b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator-ignore index 7484ee590a..677a9537e9 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator-ignore +++ b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator-ignore @@ -1,23 +1,4 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +# The test project must embed linux-logo.png so it can be loaded as a stream. +src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj -# 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/csharp/OpenAPIClient/.openapi-generator/FILES b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/FILES index 22b0c1f3da..059bcf471c 100644 --- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/FILES +++ b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/FILES @@ -60,7 +60,6 @@ docs/UserApi.md docs/XmlItem.md git_push.sh mono_nunit_test.sh -src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj src/Org.OpenAPITools.Test/packages.config src/Org.OpenAPITools/Api/AnotherFakeApi.cs src/Org.OpenAPITools/Api/FakeApi.cs diff --git a/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/FILES b/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/FILES index 24f6494aec..27a3d629cc 100644 --- a/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/FILES +++ b/samples/client/petstore/dart/flutter_petstore/openapi/.openapi-generator/FILES @@ -4,6 +4,8 @@ README.md doc/ApiResponse.md doc/Category.md +doc/InlineObject.md +doc/InlineObject1.md doc/Order.md doc/Pet.md doc/PetApi.md @@ -26,6 +28,8 @@ lib/auth/http_bearer_auth.dart lib/auth/oauth.dart lib/model/api_response.dart lib/model/category.dart +lib/model/inline_object.dart +lib/model/inline_object1.dart lib/model/order.dart lib/model/pet.dart lib/model/tag.dart diff --git a/samples/client/petstore/dart/flutter_petstore/openapi/README.md b/samples/client/petstore/dart/flutter_petstore/openapi/README.md index 79b7a9edc2..014ee45392 100644 --- a/samples/client/petstore/dart/flutter_petstore/openapi/README.md +++ b/samples/client/petstore/dart/flutter_petstore/openapi/README.md @@ -47,10 +47,11 @@ import 'package:openapi/api.dart'; //openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; var api_instance = new PetApi(); -var body = new Pet(); // Pet | Pet object that needs to be added to the store +var pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - api_instance.addPet(body); + var result = api_instance.addPet(pet); + print(result); } catch (e) { print("Exception when calling PetApi->addPet: $e\n"); } @@ -89,6 +90,8 @@ Class | Method | HTTP request | Description - [ApiResponse](doc//ApiResponse.md) - [Category](doc//Category.md) + - [InlineObject](doc//InlineObject.md) + - [InlineObject1](doc//InlineObject1.md) - [Order](doc//Order.md) - [Pet](doc//Pet.md) - [Tag](doc//Tag.md) diff --git a/samples/client/petstore/dart/flutter_petstore/openapi/doc/PetApi.md b/samples/client/petstore/dart/flutter_petstore/openapi/doc/PetApi.md index 5780e7f380..3a188dec3b 100644 --- a/samples/client/petstore/dart/flutter_petstore/openapi/doc/PetApi.md +++ b/samples/client/petstore/dart/flutter_petstore/openapi/doc/PetApi.md @@ -20,7 +20,7 @@ Method | HTTP request | Description # **addPet** -> addPet(body) +> Pet addPet(pet) Add a new pet to the store @@ -31,10 +31,11 @@ import 'package:openapi/api.dart'; //openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; var api_instance = new PetApi(); -var body = new Pet(); // Pet | Pet object that needs to be added to the store +var pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - api_instance.addPet(body); + var result = api_instance.addPet(pet); + print(result); } catch (e) { print("Exception when calling PetApi->addPet: $e\n"); } @@ -44,11 +45,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | ### Return type -void (empty response body) +[**Pet**](Pet.md) ### Authorization @@ -57,7 +58,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: application/json, application/xml - - **Accept**: 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) @@ -243,7 +244,7 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **updatePet** -> updatePet(body) +> Pet updatePet(pet) Update an existing pet @@ -254,10 +255,11 @@ import 'package:openapi/api.dart'; //openapi.api.Configuration.accessToken = 'YOUR_ACCESS_TOKEN'; var api_instance = new PetApi(); -var body = new Pet(); // Pet | Pet object that needs to be added to the store +var pet = new Pet(); // Pet | Pet object that needs to be added to the store try { - api_instance.updatePet(body); + var result = api_instance.updatePet(pet); + print(result); } catch (e) { print("Exception when calling PetApi->updatePet: $e\n"); } @@ -267,11 +269,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | + **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | ### Return type -void (empty response body) +[**Pet**](Pet.md) ### Authorization @@ -280,7 +282,7 @@ void (empty response body) ### HTTP request headers - **Content-Type**: application/json, application/xml - - **Accept**: 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/dart/flutter_petstore/openapi/doc/StoreApi.md b/samples/client/petstore/dart/flutter_petstore/openapi/doc/StoreApi.md index df76647f11..a3c0364377 100644 --- a/samples/client/petstore/dart/flutter_petstore/openapi/doc/StoreApi.md +++ b/samples/client/petstore/dart/flutter_petstore/openapi/doc/StoreApi.md @@ -144,7 +144,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **placeOrder** -> Order placeOrder(body) +> Order placeOrder(order) Place an order for a pet @@ -153,10 +153,10 @@ Place an order for a pet import 'package:openapi/api.dart'; var api_instance = new StoreApi(); -var body = new Order(); // Order | order placed for purchasing the pet +var order = new Order(); // Order | order placed for purchasing the pet try { - var result = api_instance.placeOrder(body); + var result = api_instance.placeOrder(order); print(result); } catch (e) { print("Exception when calling StoreApi->placeOrder: $e\n"); @@ -167,7 +167,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | + **order** | [**Order**](Order.md)| order placed for purchasing the pet | ### Return type @@ -179,7 +179,7 @@ No authorization required ### HTTP request headers - - **Content-Type**: Not defined + - **Content-Type**: application/json - **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/dart/flutter_petstore/openapi/doc/UserApi.md b/samples/client/petstore/dart/flutter_petstore/openapi/doc/UserApi.md index d3bb61265e..ca539ab556 100644 --- a/samples/client/petstore/dart/flutter_petstore/openapi/doc/UserApi.md +++ b/samples/client/petstore/dart/flutter_petstore/openapi/doc/UserApi.md @@ -20,7 +20,7 @@ Method | HTTP request | Description # **createUser** -> createUser(body) +> createUser(user) Create user @@ -29,12 +29,16 @@ This can only be done by the logged in user. ### Example ```dart import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer"; var api_instance = new UserApi(); -var body = new User(); // User | Created user object +var user = new User(); // User | Created user object try { - api_instance.createUser(body); + api_instance.createUser(user); } catch (e) { print("Exception when calling UserApi->createUser: $e\n"); } @@ -44,7 +48,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | + **user** | [**User**](User.md)| Created user object | ### Return type @@ -52,29 +56,33 @@ void (empty response body) ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers - - **Content-Type**: Not defined + - **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) # **createUsersWithArrayInput** -> createUsersWithArrayInput(body) +> createUsersWithArrayInput(user) Creates list of users with given input array ### Example ```dart import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer"; var api_instance = new UserApi(); -var body = [new List<User>()]; // List | List of user object +var user = [new List<User>()]; // List | List of user object try { - api_instance.createUsersWithArrayInput(body); + api_instance.createUsersWithArrayInput(user); } catch (e) { print("Exception when calling UserApi->createUsersWithArrayInput: $e\n"); } @@ -84,7 +92,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | + **user** | [**List<User>**](User.md)| List of user object | ### Return type @@ -92,29 +100,33 @@ void (empty response body) ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers - - **Content-Type**: Not defined + - **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) # **createUsersWithListInput** -> createUsersWithListInput(body) +> createUsersWithListInput(user) Creates list of users with given input array ### Example ```dart import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer"; var api_instance = new UserApi(); -var body = [new List<User>()]; // List | List of user object +var user = [new List<User>()]; // List | List of user object try { - api_instance.createUsersWithListInput(body); + api_instance.createUsersWithListInput(user); } catch (e) { print("Exception when calling UserApi->createUsersWithListInput: $e\n"); } @@ -124,7 +136,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | + **user** | [**List<User>**](User.md)| List of user object | ### Return type @@ -132,11 +144,11 @@ void (empty response body) ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers - - **Content-Type**: Not defined + - **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) @@ -151,6 +163,10 @@ This can only be done by the logged in user. ### Example ```dart import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer"; var api_instance = new UserApi(); var username = username_example; // String | The name that needs to be deleted @@ -174,7 +190,7 @@ void (empty response body) ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers @@ -275,6 +291,10 @@ Logs out current logged in user session ### Example ```dart import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer"; var api_instance = new UserApi(); @@ -294,7 +314,7 @@ void (empty response body) ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers @@ -304,7 +324,7 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) # **updateUser** -> updateUser(username, body) +> updateUser(username, user) Updated user @@ -313,13 +333,17 @@ This can only be done by the logged in user. ### Example ```dart import 'package:openapi/api.dart'; +// TODO Configure API key authorization: api_key +//openapi.api.Configuration.apiKey{'api_key'} = 'YOUR_API_KEY'; +// uncomment below to setup prefix (e.g. Bearer) for API key, if needed +//openapi.api.Configuration.apiKeyPrefix{'api_key'} = "Bearer"; var api_instance = new UserApi(); var username = username_example; // String | name that need to be deleted -var body = new User(); // User | Updated user object +var user = new User(); // User | Updated user object try { - api_instance.updateUser(username, body); + api_instance.updateUser(username, user); } catch (e) { print("Exception when calling UserApi->updateUser: $e\n"); } @@ -330,7 +354,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **String**| name that need to be deleted | [default to null] - **body** | [**User**](User.md)| Updated user object | + **user** | [**User**](User.md)| Updated user object | ### Return type @@ -338,11 +362,11 @@ void (empty response body) ### Authorization -No authorization required +[api_key](../README.md#api_key) ### HTTP request headers - - **Content-Type**: Not defined + - **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) diff --git a/samples/client/petstore/dart/flutter_petstore/openapi/lib/api.dart b/samples/client/petstore/dart/flutter_petstore/openapi/lib/api.dart index 9a64a5342b..4889d9c292 100644 --- a/samples/client/petstore/dart/flutter_petstore/openapi/lib/api.dart +++ b/samples/client/petstore/dart/flutter_petstore/openapi/lib/api.dart @@ -18,6 +18,8 @@ part 'api/user_api.dart'; part 'model/api_response.dart'; part 'model/category.dart'; +part 'model/inline_object.dart'; +part 'model/inline_object1.dart'; part 'model/order.dart'; part 'model/pet.dart'; part 'model/tag.dart'; diff --git a/samples/client/petstore/dart/flutter_petstore/openapi/lib/api/pet_api.dart b/samples/client/petstore/dart/flutter_petstore/openapi/lib/api/pet_api.dart index 6ffc146490..8b68bf54e1 100644 --- a/samples/client/petstore/dart/flutter_petstore/openapi/lib/api/pet_api.dart +++ b/samples/client/petstore/dart/flutter_petstore/openapi/lib/api/pet_api.dart @@ -10,12 +10,12 @@ class PetApi { /// Add a new pet to the store /// /// - Future addPet(Pet body) async { - Object postBody = body; + Future addPet(Pet pet) async { + Object postBody = pet; // verify required params are set - if(body == null) { - throw new ApiException(400, "Missing required param: body"); + if(pet == null) { + throw new ApiException(400, "Missing required param: pet"); } // create path and map variables @@ -52,8 +52,9 @@ class PetApi { if(response.statusCode >= 400) { throw new ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { + return apiClient.deserialize(_decodeBodyBytes(response), 'Pet') as Pet; } else { - return; + return null; } } /// Deletes a pet @@ -261,12 +262,12 @@ class PetApi { /// Update an existing pet /// /// - Future updatePet(Pet body) async { - Object postBody = body; + Future updatePet(Pet pet) async { + Object postBody = pet; // verify required params are set - if(body == null) { - throw new ApiException(400, "Missing required param: body"); + if(pet == null) { + throw new ApiException(400, "Missing required param: pet"); } // create path and map variables @@ -303,8 +304,9 @@ class PetApi { if(response.statusCode >= 400) { throw new ApiException(response.statusCode, _decodeBodyBytes(response)); } else if(response.body != null) { + return apiClient.deserialize(_decodeBodyBytes(response), 'Pet') as Pet; } else { - return; + return null; } } /// Updates a pet in the store with form data diff --git a/samples/client/petstore/dart/flutter_petstore/openapi/lib/api/store_api.dart b/samples/client/petstore/dart/flutter_petstore/openapi/lib/api/store_api.dart index 7475aa4d99..122b2a3e6c 100644 --- a/samples/client/petstore/dart/flutter_petstore/openapi/lib/api/store_api.dart +++ b/samples/client/petstore/dart/flutter_petstore/openapi/lib/api/store_api.dart @@ -157,12 +157,12 @@ class StoreApi { /// Place an order for a pet /// /// - Future placeOrder(Order body) async { - Object postBody = body; + Future placeOrder(Order order) async { + Object postBody = order; // verify required params are set - if(body == null) { - throw new ApiException(400, "Missing required param: body"); + if(order == null) { + throw new ApiException(400, "Missing required param: order"); } // create path and map variables @@ -173,7 +173,7 @@ class StoreApi { Map headerParams = {}; Map formParams = {}; - List contentTypes = []; + List contentTypes = ["application/json"]; String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; List authNames = []; diff --git a/samples/client/petstore/dart/flutter_petstore/openapi/lib/api/user_api.dart b/samples/client/petstore/dart/flutter_petstore/openapi/lib/api/user_api.dart index 8f00081a8c..a1d232be9c 100644 --- a/samples/client/petstore/dart/flutter_petstore/openapi/lib/api/user_api.dart +++ b/samples/client/petstore/dart/flutter_petstore/openapi/lib/api/user_api.dart @@ -10,12 +10,12 @@ class UserApi { /// Create user /// /// This can only be done by the logged in user. - Future createUser(User body) async { - Object postBody = body; + Future createUser(User user) async { + Object postBody = user; // verify required params are set - if(body == null) { - throw new ApiException(400, "Missing required param: body"); + if(user == null) { + throw new ApiException(400, "Missing required param: user"); } // create path and map variables @@ -26,10 +26,10 @@ class UserApi { Map headerParams = {}; Map formParams = {}; - List contentTypes = []; + List contentTypes = ["application/json"]; String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = []; + List authNames = ["api_key"]; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; @@ -59,12 +59,12 @@ class UserApi { /// Creates list of users with given input array /// /// - Future createUsersWithArrayInput(List body) async { - Object postBody = body; + Future createUsersWithArrayInput(List user) async { + Object postBody = user; // verify required params are set - if(body == null) { - throw new ApiException(400, "Missing required param: body"); + if(user == null) { + throw new ApiException(400, "Missing required param: user"); } // create path and map variables @@ -75,10 +75,10 @@ class UserApi { Map headerParams = {}; Map formParams = {}; - List contentTypes = []; + List contentTypes = ["application/json"]; String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = []; + List authNames = ["api_key"]; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; @@ -108,12 +108,12 @@ class UserApi { /// Creates list of users with given input array /// /// - Future createUsersWithListInput(List body) async { - Object postBody = body; + Future createUsersWithListInput(List user) async { + Object postBody = user; // verify required params are set - if(body == null) { - throw new ApiException(400, "Missing required param: body"); + if(user == null) { + throw new ApiException(400, "Missing required param: user"); } // create path and map variables @@ -124,10 +124,10 @@ class UserApi { Map headerParams = {}; Map formParams = {}; - List contentTypes = []; + List contentTypes = ["application/json"]; String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = []; + List authNames = ["api_key"]; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; @@ -176,7 +176,7 @@ class UserApi { List contentTypes = []; String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = []; + List authNames = ["api_key"]; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; @@ -327,7 +327,7 @@ class UserApi { List contentTypes = []; String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = []; + List authNames = ["api_key"]; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; @@ -357,15 +357,15 @@ class UserApi { /// Updated user /// /// This can only be done by the logged in user. - Future updateUser(String username, User body) async { - Object postBody = body; + Future updateUser(String username, User user) async { + Object postBody = user; // verify required params are set if(username == null) { throw new ApiException(400, "Missing required param: username"); } - if(body == null) { - throw new ApiException(400, "Missing required param: body"); + if(user == null) { + throw new ApiException(400, "Missing required param: user"); } // create path and map variables @@ -376,10 +376,10 @@ class UserApi { Map headerParams = {}; Map formParams = {}; - List contentTypes = []; + List contentTypes = ["application/json"]; String contentType = contentTypes.length > 0 ? contentTypes[0] : "application/json"; - List authNames = []; + List authNames = ["api_key"]; if(contentType.startsWith("multipart/form-data")) { bool hasFields = false; diff --git a/samples/client/petstore/dart/flutter_petstore/openapi/lib/api_client.dart b/samples/client/petstore/dart/flutter_petstore/openapi/lib/api_client.dart index 3524b1301f..7cfb5ff0f3 100644 --- a/samples/client/petstore/dart/flutter_petstore/openapi/lib/api_client.dart +++ b/samples/client/petstore/dart/flutter_petstore/openapi/lib/api_client.dart @@ -43,6 +43,10 @@ class ApiClient { return new ApiResponse.fromJson(value); case 'Category': return new Category.fromJson(value); + case 'InlineObject': + return new InlineObject.fromJson(value); + case 'InlineObject1': + return new InlineObject1.fromJson(value); case 'Order': return new Order.fromJson(value); case 'Pet': diff --git a/samples/client/petstore/go-experimental/go-petstore/.openapi-generator/FILES b/samples/client/petstore/go-experimental/go-petstore/.openapi-generator/FILES index ff02be3b9e..dda891d9ed 100644 --- a/samples/client/petstore/go-experimental/go-petstore/.openapi-generator/FILES +++ b/samples/client/petstore/go-experimental/go-petstore/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/FILES b/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/FILES index 11af805248..28a8ffd70f 100644 --- a/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/FILES +++ b/samples/client/petstore/go/go-petstore-withXml/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/go/go-petstore/.openapi-generator/FILES b/samples/client/petstore/go/go-petstore/.openapi-generator/FILES index 11af805248..28a8ffd70f 100644 --- a/samples/client/petstore/go/go-petstore/.openapi-generator/FILES +++ b/samples/client/petstore/go/go-petstore/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/java/feign10x/.openapi-generator-ignore b/samples/client/petstore/java/feign10x/.openapi-generator-ignore index 7484ee590a..e829446f0b 100644 --- a/samples/client/petstore/java/feign10x/.openapi-generator-ignore +++ b/samples/client/petstore/java/feign10x/.openapi-generator-ignore @@ -1,23 +1,4 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +# This is a "live" test which should not be overwritten +src/test/java/org/openapitools/client/StringUtilTest.java -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/java/feign10x/.openapi-generator/FILES b/samples/client/petstore/java/feign10x/.openapi-generator/FILES index 4fa1d13eeb..1e34131044 100644 --- a/samples/client/petstore/java/feign10x/.openapi-generator/FILES +++ b/samples/client/petstore/java/feign10x/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/java/google-api-client/.openapi-generator/FILES b/samples/client/petstore/java/google-api-client/.openapi-generator/FILES index 9b1a5ed4a2..e6f553b318 100644 --- a/samples/client/petstore/java/google-api-client/.openapi-generator/FILES +++ b/samples/client/petstore/java/google-api-client/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/java/jersey1/.openapi-generator-ignore b/samples/client/petstore/java/jersey1/.openapi-generator-ignore index 7484ee590a..323ce96e73 100644 --- a/samples/client/petstore/java/jersey1/.openapi-generator-ignore +++ b/samples/client/petstore/java/jersey1/.openapi-generator-ignore @@ -1,23 +1,9 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +# These are "live" tests that should not be overwritten +src/test/java/org/openapitools/client/StringUtilTest.java +src/test/java/org/openapitools/client/ApiClientTest.java +src/test/java/org/openapitools/client/ConfigurationTest.java +src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java +src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java +src/test/java/org/openapitools/client/model/EnumValueTest.java -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/java/jersey1/.openapi-generator/FILES b/samples/client/petstore/java/jersey1/.openapi-generator/FILES index 02508529f3..1c6e0a38c6 100644 --- a/samples/client/petstore/java/jersey1/.openapi-generator/FILES +++ b/samples/client/petstore/java/jersey1/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/java/jersey2-java8/.openapi-generator-ignore b/samples/client/petstore/java/jersey2-java8/.openapi-generator-ignore index 7484ee590a..79656709d8 100644 --- a/samples/client/petstore/java/jersey2-java8/.openapi-generator-ignore +++ b/samples/client/petstore/java/jersey2-java8/.openapi-generator-ignore @@ -1,23 +1,4 @@ # 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 +# These are "live" test files which should not be overwritten +src/test/java/org/openapitools/client/JSONTest.java +src/test/java/org/openapitools/client/JSONComposedSchemaTest.java \ No newline at end of file diff --git a/samples/client/petstore/java/jersey2-java8/.openapi-generator/FILES b/samples/client/petstore/java/jersey2-java8/.openapi-generator/FILES index ec3057e786..2551862386 100644 --- a/samples/client/petstore/java/jersey2-java8/.openapi-generator/FILES +++ b/samples/client/petstore/java/jersey2-java8/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/FILES b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/FILES index b1ed7fac02..ae145903e5 100644 --- a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/FILES +++ b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md docs/Category.md docs/ModelApiResponse.md diff --git a/samples/client/petstore/java/native/.openapi-generator/FILES b/samples/client/petstore/java/native/.openapi-generator/FILES index 2614283ebd..48923dfacb 100644 --- a/samples/client/petstore/java/native/.openapi-generator/FILES +++ b/samples/client/petstore/java/native/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/FILES b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/FILES index 487da55fc8..3cd1732371 100644 --- a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/FILES +++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/java/okhttp-gson/.openapi-generator-ignore b/samples/client/petstore/java/okhttp-gson/.openapi-generator-ignore index 7484ee590a..fa2ddf08fc 100644 --- a/samples/client/petstore/java/okhttp-gson/.openapi-generator-ignore +++ b/samples/client/petstore/java/okhttp-gson/.openapi-generator-ignore @@ -1,23 +1,13 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +# These tests are "live" tests and should not be overwritten +src/test/java/org/openapitools/client/StringUtilTest.java +src/test/java/org/openapitools/client/ApiClientTest.java +src/test/java/org/openapitools/client/ConfigurationTest.java +src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java +src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java +src/test/java/org/openapitools/client/model/EnumValueTest.java +src/test/java/org/openapitools/client/model/PetTest.java +src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java +src/test/java/org/openapitools/client/JSONTest.java +src/test/java/org/openapitools/client/api/PetApiTest.java -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/java/okhttp-gson/.openapi-generator/FILES b/samples/client/petstore/java/okhttp-gson/.openapi-generator/FILES index 487da55fc8..3cd1732371 100644 --- a/samples/client/petstore/java/okhttp-gson/.openapi-generator/FILES +++ b/samples/client/petstore/java/okhttp-gson/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/FILES b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/FILES index 1ec6b7ec46..5f08ec35a2 100644 --- a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/FILES +++ b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml @@ -126,55 +125,3 @@ src/main/java/org/openapitools/client/model/TypeHolderDefault.java src/main/java/org/openapitools/client/model/TypeHolderExample.java src/main/java/org/openapitools/client/model/User.java src/main/java/org/openapitools/client/model/XmlItem.java -src/test/java/org/openapitools/client/api/AnotherFakeApiTest.java -src/test/java/org/openapitools/client/api/FakeApiTest.java -src/test/java/org/openapitools/client/api/FakeClassnameTags123ApiTest.java -src/test/java/org/openapitools/client/api/PetApiTest.java -src/test/java/org/openapitools/client/api/StoreApiTest.java -src/test/java/org/openapitools/client/api/UserApiTest.java -src/test/java/org/openapitools/client/model/AdditionalPropertiesAnyTypeTest.java -src/test/java/org/openapitools/client/model/AdditionalPropertiesArrayTest.java -src/test/java/org/openapitools/client/model/AdditionalPropertiesBooleanTest.java -src/test/java/org/openapitools/client/model/AdditionalPropertiesClassTest.java -src/test/java/org/openapitools/client/model/AdditionalPropertiesIntegerTest.java -src/test/java/org/openapitools/client/model/AdditionalPropertiesNumberTest.java -src/test/java/org/openapitools/client/model/AdditionalPropertiesObjectTest.java -src/test/java/org/openapitools/client/model/AdditionalPropertiesStringTest.java -src/test/java/org/openapitools/client/model/AnimalTest.java -src/test/java/org/openapitools/client/model/ArrayOfArrayOfNumberOnlyTest.java -src/test/java/org/openapitools/client/model/ArrayOfNumberOnlyTest.java -src/test/java/org/openapitools/client/model/ArrayTestTest.java -src/test/java/org/openapitools/client/model/BigCatAllOfTest.java -src/test/java/org/openapitools/client/model/BigCatTest.java -src/test/java/org/openapitools/client/model/CapitalizationTest.java -src/test/java/org/openapitools/client/model/CatAllOfTest.java -src/test/java/org/openapitools/client/model/CatTest.java -src/test/java/org/openapitools/client/model/CategoryTest.java -src/test/java/org/openapitools/client/model/ClassModelTest.java -src/test/java/org/openapitools/client/model/ClientTest.java -src/test/java/org/openapitools/client/model/DogAllOfTest.java -src/test/java/org/openapitools/client/model/DogTest.java -src/test/java/org/openapitools/client/model/EnumArraysTest.java -src/test/java/org/openapitools/client/model/EnumClassTest.java -src/test/java/org/openapitools/client/model/EnumTestTest.java -src/test/java/org/openapitools/client/model/FileSchemaTestClassTest.java -src/test/java/org/openapitools/client/model/FormatTestTest.java -src/test/java/org/openapitools/client/model/HasOnlyReadOnlyTest.java -src/test/java/org/openapitools/client/model/MapTestTest.java -src/test/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClassTest.java -src/test/java/org/openapitools/client/model/Model200ResponseTest.java -src/test/java/org/openapitools/client/model/ModelApiResponseTest.java -src/test/java/org/openapitools/client/model/ModelReturnTest.java -src/test/java/org/openapitools/client/model/NameTest.java -src/test/java/org/openapitools/client/model/NumberOnlyTest.java -src/test/java/org/openapitools/client/model/OrderTest.java -src/test/java/org/openapitools/client/model/OuterCompositeTest.java -src/test/java/org/openapitools/client/model/OuterEnumTest.java -src/test/java/org/openapitools/client/model/PetTest.java -src/test/java/org/openapitools/client/model/ReadOnlyFirstTest.java -src/test/java/org/openapitools/client/model/SpecialModelNameTest.java -src/test/java/org/openapitools/client/model/TagTest.java -src/test/java/org/openapitools/client/model/TypeHolderDefaultTest.java -src/test/java/org/openapitools/client/model/TypeHolderExampleTest.java -src/test/java/org/openapitools/client/model/UserTest.java -src/test/java/org/openapitools/client/model/XmlItemTest.java diff --git a/samples/client/petstore/java/rest-assured/.openapi-generator/FILES b/samples/client/petstore/java/rest-assured/.openapi-generator/FILES index 788e11e8b4..05f54dd392 100644 --- a/samples/client/petstore/java/rest-assured/.openapi-generator/FILES +++ b/samples/client/petstore/java/rest-assured/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/java/resteasy/.openapi-generator/FILES b/samples/client/petstore/java/resteasy/.openapi-generator/FILES index dda27c587a..21772fc513 100644 --- a/samples/client/petstore/java/resteasy/.openapi-generator/FILES +++ b/samples/client/petstore/java/resteasy/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/FILES b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/FILES index 03765b422b..535678e0a8 100644 --- a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/FILES +++ b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/java/resttemplate/.openapi-generator-ignore b/samples/client/petstore/java/resttemplate/.openapi-generator-ignore index 7484ee590a..ff76131306 100644 --- a/samples/client/petstore/java/resttemplate/.openapi-generator-ignore +++ b/samples/client/petstore/java/resttemplate/.openapi-generator-ignore @@ -1,23 +1,6 @@ # 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 +# These files are "live" tests which should not be overwritten. +src/test/java/org/openapitools/client/ApiClientTest.java +src/test/java/org/openapitools/client/auth/ApiKeyAuthTest.java +src/test/java/org/openapitools/client/auth/HttpBasicAuthTest.java +src/test/java/org/openapitools/client/model/EnumValueTest.java diff --git a/samples/client/petstore/java/resttemplate/.openapi-generator/FILES b/samples/client/petstore/java/resttemplate/.openapi-generator/FILES index 03765b422b..535678e0a8 100644 --- a/samples/client/petstore/java/resttemplate/.openapi-generator/FILES +++ b/samples/client/petstore/java/resttemplate/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/java/retrofit2-play24/.openapi-generator/FILES b/samples/client/petstore/java/retrofit2-play24/.openapi-generator/FILES index 99c1f65498..a562460201 100644 --- a/samples/client/petstore/java/retrofit2-play24/.openapi-generator/FILES +++ b/samples/client/petstore/java/retrofit2-play24/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/java/retrofit2-play25/.openapi-generator/FILES b/samples/client/petstore/java/retrofit2-play25/.openapi-generator/FILES index be4ab8505c..af054bf73c 100644 --- a/samples/client/petstore/java/retrofit2-play25/.openapi-generator/FILES +++ b/samples/client/petstore/java/retrofit2-play25/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/FILES b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/FILES index ebda8ecef5..f9e53f21c7 100644 --- a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/FILES +++ b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/java/retrofit2/.openapi-generator/FILES b/samples/client/petstore/java/retrofit2/.openapi-generator/FILES index 299bd8c42f..27ea75ae65 100644 --- a/samples/client/petstore/java/retrofit2/.openapi-generator/FILES +++ b/samples/client/petstore/java/retrofit2/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/java/retrofit2rx/.openapi-generator/FILES b/samples/client/petstore/java/retrofit2rx/.openapi-generator/FILES index 299bd8c42f..27ea75ae65 100644 --- a/samples/client/petstore/java/retrofit2rx/.openapi-generator/FILES +++ b/samples/client/petstore/java/retrofit2rx/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/FILES b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/FILES index 299bd8c42f..27ea75ae65 100644 --- a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/FILES +++ b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/java/vertx/.openapi-generator/FILES b/samples/client/petstore/java/vertx/.openapi-generator/FILES index ed426605c3..82fed67a26 100644 --- a/samples/client/petstore/java/vertx/.openapi-generator/FILES +++ b/samples/client/petstore/java/vertx/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/java/webclient/.openapi-generator/FILES b/samples/client/petstore/java/webclient/.openapi-generator/FILES index dd1c115a00..bc6035c8a0 100644 --- a/samples/client/petstore/java/webclient/.openapi-generator/FILES +++ b/samples/client/petstore/java/webclient/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/FILES b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/FILES index f2b161556c..723be80c5a 100644 --- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/FILES +++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md build.gradle docs/ApiResponse.md diff --git a/samples/client/petstore/kotlin-string/.openapi-generator-ignore b/samples/client/petstore/kotlin-string/.openapi-generator-ignore index 7484ee590a..cabbe3494d 100644 --- a/samples/client/petstore/kotlin-string/.openapi-generator-ignore +++ b/samples/client/petstore/kotlin-string/.openapi-generator-ignore @@ -1,23 +1,3 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +pom.xml -# 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/kotlin-threetenbp/.openapi-generator-ignore b/samples/client/petstore/kotlin-threetenbp/.openapi-generator-ignore index 7484ee590a..cabbe3494d 100644 --- a/samples/client/petstore/kotlin-threetenbp/.openapi-generator-ignore +++ b/samples/client/petstore/kotlin-threetenbp/.openapi-generator-ignore @@ -1,23 +1,3 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +pom.xml -# 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/php/OpenAPIClient-php/.openapi-generator/FILES b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES index ab9845ac2f..72f2a6e758 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES +++ b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES @@ -118,57 +118,3 @@ lib/Model/User.php lib/Model/XmlItem.php lib/ObjectSerializer.php phpunit.xml.dist -test/Api/AnotherFakeApiTest.php -test/Api/FakeApiTest.php -test/Api/FakeClassnameTags123ApiTest.php -test/Api/PetApiTest.php -test/Api/StoreApiTest.php -test/Api/UserApiTest.php -test/Model/AdditionalPropertiesAnyTypeTest.php -test/Model/AdditionalPropertiesArrayTest.php -test/Model/AdditionalPropertiesBooleanTest.php -test/Model/AdditionalPropertiesClassTest.php -test/Model/AdditionalPropertiesIntegerTest.php -test/Model/AdditionalPropertiesNumberTest.php -test/Model/AdditionalPropertiesObjectTest.php -test/Model/AdditionalPropertiesStringTest.php -test/Model/AnimalTest.php -test/Model/ApiResponseTest.php -test/Model/ArrayOfArrayOfNumberOnlyTest.php -test/Model/ArrayOfNumberOnlyTest.php -test/Model/ArrayTestTest.php -test/Model/BigCatAllOfTest.php -test/Model/BigCatTest.php -test/Model/CapitalizationTest.php -test/Model/CatAllOfTest.php -test/Model/CatTest.php -test/Model/CategoryTest.php -test/Model/ClassModelTest.php -test/Model/ClientTest.php -test/Model/DogAllOfTest.php -test/Model/DogTest.php -test/Model/EnumArraysTest.php -test/Model/EnumClassTest.php -test/Model/EnumTestTest.php -test/Model/FileSchemaTestClassTest.php -test/Model/FileTest.php -test/Model/FormatTestTest.php -test/Model/HasOnlyReadOnlyTest.php -test/Model/MapTestTest.php -test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php -test/Model/Model200ResponseTest.php -test/Model/ModelListTest.php -test/Model/ModelReturnTest.php -test/Model/NameTest.php -test/Model/NumberOnlyTest.php -test/Model/OrderTest.php -test/Model/OuterCompositeTest.php -test/Model/OuterEnumTest.php -test/Model/PetTest.php -test/Model/ReadOnlyFirstTest.php -test/Model/SpecialModelNameTest.php -test/Model/TagTest.php -test/Model/TypeHolderDefaultTest.php -test/Model/TypeHolderExampleTest.php -test/Model/UserTest.php -test/Model/XmlItemTest.php diff --git a/samples/client/petstore/ruby-faraday/.openapi-generator/FILES b/samples/client/petstore/ruby-faraday/.openapi-generator/FILES index 1bb03794c7..dff9045f9b 100644 --- a/samples/client/petstore/ruby-faraday/.openapi-generator/FILES +++ b/samples/client/petstore/ruby-faraday/.openapi-generator/FILES @@ -32,6 +32,12 @@ docs/Foo.md docs/FormatTest.md docs/HasOnlyReadOnly.md docs/HealthCheckResult.md +docs/InlineObject.md +docs/InlineObject1.md +docs/InlineObject2.md +docs/InlineObject3.md +docs/InlineObject4.md +docs/InlineObject5.md docs/InlineResponseDefault.md docs/List.md docs/MapTest.md @@ -91,6 +97,12 @@ lib/petstore/models/foo.rb lib/petstore/models/format_test.rb lib/petstore/models/has_only_read_only.rb lib/petstore/models/health_check_result.rb +lib/petstore/models/inline_object.rb +lib/petstore/models/inline_object1.rb +lib/petstore/models/inline_object2.rb +lib/petstore/models/inline_object3.rb +lib/petstore/models/inline_object4.rb +lib/petstore/models/inline_object5.rb lib/petstore/models/inline_response_default.rb lib/petstore/models/list.rb lib/petstore/models/map_test.rb @@ -113,56 +125,6 @@ lib/petstore/models/tag.rb lib/petstore/models/user.rb lib/petstore/version.rb petstore.gemspec -spec/api/another_fake_api_spec.rb -spec/api/default_api_spec.rb -spec/api/fake_api_spec.rb -spec/api/fake_classname_tags123_api_spec.rb -spec/api/pet_api_spec.rb -spec/api/store_api_spec.rb -spec/api/user_api_spec.rb spec/api_client_spec.rb spec/configuration_spec.rb -spec/models/additional_properties_class_spec.rb -spec/models/animal_spec.rb -spec/models/api_response_spec.rb -spec/models/array_of_array_of_number_only_spec.rb -spec/models/array_of_number_only_spec.rb -spec/models/array_test_spec.rb -spec/models/capitalization_spec.rb -spec/models/cat_all_of_spec.rb -spec/models/cat_spec.rb -spec/models/category_spec.rb -spec/models/class_model_spec.rb -spec/models/client_spec.rb -spec/models/dog_all_of_spec.rb -spec/models/dog_spec.rb -spec/models/enum_arrays_spec.rb -spec/models/enum_class_spec.rb -spec/models/enum_test_spec.rb -spec/models/file_schema_test_class_spec.rb -spec/models/file_spec.rb -spec/models/foo_spec.rb -spec/models/format_test_spec.rb -spec/models/has_only_read_only_spec.rb -spec/models/health_check_result_spec.rb -spec/models/inline_response_default_spec.rb -spec/models/list_spec.rb -spec/models/map_test_spec.rb -spec/models/mixed_properties_and_additional_properties_class_spec.rb -spec/models/model200_response_spec.rb -spec/models/model_return_spec.rb -spec/models/name_spec.rb -spec/models/nullable_class_spec.rb -spec/models/number_only_spec.rb -spec/models/order_spec.rb -spec/models/outer_composite_spec.rb -spec/models/outer_enum_default_value_spec.rb -spec/models/outer_enum_integer_default_value_spec.rb -spec/models/outer_enum_integer_spec.rb -spec/models/outer_enum_spec.rb -spec/models/pet_spec.rb -spec/models/read_only_first_spec.rb -spec/models/special_model_name_spec.rb -spec/models/tag_spec.rb -spec/models/user_spec.rb spec/spec_helper.rb diff --git a/samples/client/petstore/ruby-faraday/README.md b/samples/client/petstore/ruby-faraday/README.md index 35c76f3817..719039e531 100644 --- a/samples/client/petstore/ruby-faraday/README.md +++ b/samples/client/petstore/ruby-faraday/README.md @@ -141,6 +141,12 @@ Class | Method | HTTP request | Description - [Petstore::FormatTest](docs/FormatTest.md) - [Petstore::HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - [Petstore::HealthCheckResult](docs/HealthCheckResult.md) + - [Petstore::InlineObject](docs/InlineObject.md) + - [Petstore::InlineObject1](docs/InlineObject1.md) + - [Petstore::InlineObject2](docs/InlineObject2.md) + - [Petstore::InlineObject3](docs/InlineObject3.md) + - [Petstore::InlineObject4](docs/InlineObject4.md) + - [Petstore::InlineObject5](docs/InlineObject5.md) - [Petstore::InlineResponseDefault](docs/InlineResponseDefault.md) - [Petstore::List](docs/List.md) - [Petstore::MapTest](docs/MapTest.md) diff --git a/samples/client/petstore/ruby-faraday/docs/InlineObject.md b/samples/client/petstore/ruby-faraday/docs/InlineObject.md new file mode 100644 index 0000000000..f5211d4446 --- /dev/null +++ b/samples/client/petstore/ruby-faraday/docs/InlineObject.md @@ -0,0 +1,19 @@ +# Petstore::InlineObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Updated name of the pet | [optional] +**status** | **String** | Updated status of the pet | [optional] + +## Code Sample + +```ruby +require 'Petstore' + +instance = Petstore::InlineObject.new(name: null, + status: null) +``` + + diff --git a/samples/client/petstore/ruby-faraday/docs/InlineObject1.md b/samples/client/petstore/ruby-faraday/docs/InlineObject1.md new file mode 100644 index 0000000000..bac17e753c --- /dev/null +++ b/samples/client/petstore/ruby-faraday/docs/InlineObject1.md @@ -0,0 +1,19 @@ +# Petstore::InlineObject1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additional_metadata** | **String** | Additional data to pass to server | [optional] +**file** | **File** | file to upload | [optional] + +## Code Sample + +```ruby +require 'Petstore' + +instance = Petstore::InlineObject1.new(additional_metadata: null, + file: null) +``` + + diff --git a/samples/client/petstore/ruby-faraday/docs/InlineObject2.md b/samples/client/petstore/ruby-faraday/docs/InlineObject2.md new file mode 100644 index 0000000000..31118c5b26 --- /dev/null +++ b/samples/client/petstore/ruby-faraday/docs/InlineObject2.md @@ -0,0 +1,19 @@ +# Petstore::InlineObject2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enum_form_string_array** | **Array<String>** | Form parameter enum test (string array) | [optional] +**enum_form_string** | **String** | Form parameter enum test (string) | [optional] [default to '-efg'] + +## Code Sample + +```ruby +require 'Petstore' + +instance = Petstore::InlineObject2.new(enum_form_string_array: null, + enum_form_string: null) +``` + + diff --git a/samples/client/petstore/ruby-faraday/docs/InlineObject3.md b/samples/client/petstore/ruby-faraday/docs/InlineObject3.md new file mode 100644 index 0000000000..b6cb7ccb29 --- /dev/null +++ b/samples/client/petstore/ruby-faraday/docs/InlineObject3.md @@ -0,0 +1,43 @@ +# Petstore::InlineObject3 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Integer** | None | [optional] +**int32** | **Integer** | None | [optional] +**int64** | **Integer** | None | [optional] +**number** | **Float** | None | +**float** | **Float** | None | [optional] +**double** | **Float** | None | +**string** | **String** | None | [optional] +**pattern_without_delimiter** | **String** | None | +**byte** | **String** | None | +**binary** | **File** | None | [optional] +**date** | **Date** | None | [optional] +**date_time** | **DateTime** | None | [optional] +**password** | **String** | None | [optional] +**callback** | **String** | None | [optional] + +## Code Sample + +```ruby +require 'Petstore' + +instance = Petstore::InlineObject3.new(integer: null, + int32: null, + int64: null, + number: null, + float: null, + double: null, + string: null, + pattern_without_delimiter: null, + byte: null, + binary: null, + date: null, + date_time: null, + password: null, + callback: null) +``` + + diff --git a/samples/client/petstore/ruby-faraday/docs/InlineObject4.md b/samples/client/petstore/ruby-faraday/docs/InlineObject4.md new file mode 100644 index 0000000000..97179c3e37 --- /dev/null +++ b/samples/client/petstore/ruby-faraday/docs/InlineObject4.md @@ -0,0 +1,19 @@ +# Petstore::InlineObject4 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**param** | **String** | field1 | +**param2** | **String** | field2 | + +## Code Sample + +```ruby +require 'Petstore' + +instance = Petstore::InlineObject4.new(param: null, + param2: null) +``` + + diff --git a/samples/client/petstore/ruby-faraday/docs/InlineObject5.md b/samples/client/petstore/ruby-faraday/docs/InlineObject5.md new file mode 100644 index 0000000000..23c1df99ff --- /dev/null +++ b/samples/client/petstore/ruby-faraday/docs/InlineObject5.md @@ -0,0 +1,19 @@ +# Petstore::InlineObject5 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additional_metadata** | **String** | Additional data to pass to server | [optional] +**required_file** | **File** | file to upload | + +## Code Sample + +```ruby +require 'Petstore' + +instance = Petstore::InlineObject5.new(additional_metadata: null, + required_file: null) +``` + + diff --git a/samples/client/petstore/ruby-faraday/lib/petstore.rb b/samples/client/petstore/ruby-faraday/lib/petstore.rb index f0df2170db..7f8ae56e12 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore.rb @@ -40,6 +40,12 @@ require 'petstore/models/foo' require 'petstore/models/format_test' require 'petstore/models/has_only_read_only' require 'petstore/models/health_check_result' +require 'petstore/models/inline_object' +require 'petstore/models/inline_object1' +require 'petstore/models/inline_object2' +require 'petstore/models/inline_object3' +require 'petstore/models/inline_object4' +require 'petstore/models/inline_object5' require 'petstore/models/inline_response_default' require 'petstore/models/list' require 'petstore/models/map_test' diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object.rb new file mode 100644 index 0000000000..7d2ce0e05f --- /dev/null +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object.rb @@ -0,0 +1,217 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'date' + +module Petstore + class InlineObject + # Updated name of the pet + attr_accessor :name + + # Updated status of the pet + attr_accessor :status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'status' => :'status' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'status' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Petstore.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object1.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object1.rb new file mode 100644 index 0000000000..45a9d5bfcd --- /dev/null +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object1.rb @@ -0,0 +1,217 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'date' + +module Petstore + class InlineObject1 + # Additional data to pass to server + attr_accessor :additional_metadata + + # file to upload + attr_accessor :file + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'additional_metadata' => :'additionalMetadata', + :'file' => :'file' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'additional_metadata' => :'String', + :'file' => :'File' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'additional_metadata') + self.additional_metadata = attributes[:'additional_metadata'] + end + + if attributes.key?(:'file') + self.file = attributes[:'file'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + additional_metadata == o.additional_metadata && + file == o.file + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [additional_metadata, file].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Petstore.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object2.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object2.rb new file mode 100644 index 0000000000..51784af066 --- /dev/null +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object2.rb @@ -0,0 +1,255 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'date' + +module Petstore + class InlineObject2 + # Form parameter enum test (string array) + attr_accessor :enum_form_string_array + + # Form parameter enum test (string) + attr_accessor :enum_form_string + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'enum_form_string_array' => :'enum_form_string_array', + :'enum_form_string' => :'enum_form_string' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'enum_form_string_array' => :'Array', + :'enum_form_string' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'enum_form_string_array') + if (value = attributes[:'enum_form_string_array']).is_a?(Array) + self.enum_form_string_array = value + end + end + + if attributes.key?(:'enum_form_string') + self.enum_form_string = attributes[:'enum_form_string'] + else + self.enum_form_string = '-efg' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + enum_form_string_validator = EnumAttributeValidator.new('String', ["_abc", "-efg", "(xyz)"]) + return false unless enum_form_string_validator.valid?(@enum_form_string) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] enum_form_string Object to be assigned + def enum_form_string=(enum_form_string) + validator = EnumAttributeValidator.new('String', ["_abc", "-efg", "(xyz)"]) + unless validator.valid?(enum_form_string) + fail ArgumentError, "invalid value for \"enum_form_string\", must be one of #{validator.allowable_values}." + end + @enum_form_string = enum_form_string + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enum_form_string_array == o.enum_form_string_array && + enum_form_string == o.enum_form_string + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [enum_form_string_array, enum_form_string].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Petstore.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object3.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object3.rb new file mode 100644 index 0000000000..71fe8bd38a --- /dev/null +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object3.rb @@ -0,0 +1,538 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'date' + +module Petstore + class InlineObject3 + # None + attr_accessor :integer + + # None + attr_accessor :int32 + + # None + attr_accessor :int64 + + # None + attr_accessor :number + + # None + attr_accessor :float + + # None + attr_accessor :double + + # None + attr_accessor :string + + # None + attr_accessor :pattern_without_delimiter + + # None + attr_accessor :byte + + # None + attr_accessor :binary + + # None + attr_accessor :date + + # None + attr_accessor :date_time + + # None + attr_accessor :password + + # None + attr_accessor :callback + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'integer' => :'integer', + :'int32' => :'int32', + :'int64' => :'int64', + :'number' => :'number', + :'float' => :'float', + :'double' => :'double', + :'string' => :'string', + :'pattern_without_delimiter' => :'pattern_without_delimiter', + :'byte' => :'byte', + :'binary' => :'binary', + :'date' => :'date', + :'date_time' => :'dateTime', + :'password' => :'password', + :'callback' => :'callback' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'integer' => :'Integer', + :'int32' => :'Integer', + :'int64' => :'Integer', + :'number' => :'Float', + :'float' => :'Float', + :'double' => :'Float', + :'string' => :'String', + :'pattern_without_delimiter' => :'String', + :'byte' => :'String', + :'binary' => :'File', + :'date' => :'Date', + :'date_time' => :'DateTime', + :'password' => :'String', + :'callback' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject3` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject3`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'integer') + self.integer = attributes[:'integer'] + end + + if attributes.key?(:'int32') + self.int32 = attributes[:'int32'] + end + + if attributes.key?(:'int64') + self.int64 = attributes[:'int64'] + end + + if attributes.key?(:'number') + self.number = attributes[:'number'] + end + + if attributes.key?(:'float') + self.float = attributes[:'float'] + end + + if attributes.key?(:'double') + self.double = attributes[:'double'] + end + + if attributes.key?(:'string') + self.string = attributes[:'string'] + end + + if attributes.key?(:'pattern_without_delimiter') + self.pattern_without_delimiter = attributes[:'pattern_without_delimiter'] + end + + if attributes.key?(:'byte') + self.byte = attributes[:'byte'] + end + + if attributes.key?(:'binary') + self.binary = attributes[:'binary'] + end + + if attributes.key?(:'date') + self.date = attributes[:'date'] + end + + if attributes.key?(:'date_time') + self.date_time = attributes[:'date_time'] + end + + if attributes.key?(:'password') + self.password = attributes[:'password'] + end + + if attributes.key?(:'callback') + self.callback = attributes[:'callback'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@integer.nil? && @integer > 100 + invalid_properties.push('invalid value for "integer", must be smaller than or equal to 100.') + end + + if !@integer.nil? && @integer < 10 + invalid_properties.push('invalid value for "integer", must be greater than or equal to 10.') + end + + if !@int32.nil? && @int32 > 200 + invalid_properties.push('invalid value for "int32", must be smaller than or equal to 200.') + end + + if !@int32.nil? && @int32 < 20 + invalid_properties.push('invalid value for "int32", must be greater than or equal to 20.') + end + + if @number.nil? + invalid_properties.push('invalid value for "number", number cannot be nil.') + end + + if @number > 543.2 + invalid_properties.push('invalid value for "number", must be smaller than or equal to 543.2.') + end + + if @number < 32.1 + invalid_properties.push('invalid value for "number", must be greater than or equal to 32.1.') + end + + if !@float.nil? && @float > 987.6 + invalid_properties.push('invalid value for "float", must be smaller than or equal to 987.6.') + end + + if @double.nil? + invalid_properties.push('invalid value for "double", double cannot be nil.') + end + + if @double > 123.4 + invalid_properties.push('invalid value for "double", must be smaller than or equal to 123.4.') + end + + if @double < 67.8 + invalid_properties.push('invalid value for "double", must be greater than or equal to 67.8.') + end + + pattern = Regexp.new(/[a-z]/i) + if !@string.nil? && @string !~ pattern + invalid_properties.push("invalid value for \"string\", must conform to the pattern #{pattern}.") + end + + if @pattern_without_delimiter.nil? + invalid_properties.push('invalid value for "pattern_without_delimiter", pattern_without_delimiter cannot be nil.') + end + + pattern = Regexp.new(/^[A-Z].*/) + if @pattern_without_delimiter !~ pattern + invalid_properties.push("invalid value for \"pattern_without_delimiter\", must conform to the pattern #{pattern}.") + end + + if @byte.nil? + invalid_properties.push('invalid value for "byte", byte cannot be nil.') + end + + if !@password.nil? && @password.to_s.length > 64 + invalid_properties.push('invalid value for "password", the character length must be smaller than or equal to 64.') + end + + if !@password.nil? && @password.to_s.length < 10 + invalid_properties.push('invalid value for "password", the character length must be great than or equal to 10.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@integer.nil? && @integer > 100 + return false if !@integer.nil? && @integer < 10 + return false if !@int32.nil? && @int32 > 200 + return false if !@int32.nil? && @int32 < 20 + return false if @number.nil? + return false if @number > 543.2 + return false if @number < 32.1 + return false if !@float.nil? && @float > 987.6 + return false if @double.nil? + return false if @double > 123.4 + return false if @double < 67.8 + return false if !@string.nil? && @string !~ Regexp.new(/[a-z]/i) + return false if @pattern_without_delimiter.nil? + return false if @pattern_without_delimiter !~ Regexp.new(/^[A-Z].*/) + return false if @byte.nil? + return false if !@password.nil? && @password.to_s.length > 64 + return false if !@password.nil? && @password.to_s.length < 10 + true + end + + # Custom attribute writer method with validation + # @param [Object] integer Value to be assigned + def integer=(integer) + if !integer.nil? && integer > 100 + fail ArgumentError, 'invalid value for "integer", must be smaller than or equal to 100.' + end + + if !integer.nil? && integer < 10 + fail ArgumentError, 'invalid value for "integer", must be greater than or equal to 10.' + end + + @integer = integer + end + + # Custom attribute writer method with validation + # @param [Object] int32 Value to be assigned + def int32=(int32) + if !int32.nil? && int32 > 200 + fail ArgumentError, 'invalid value for "int32", must be smaller than or equal to 200.' + end + + if !int32.nil? && int32 < 20 + fail ArgumentError, 'invalid value for "int32", must be greater than or equal to 20.' + end + + @int32 = int32 + end + + # Custom attribute writer method with validation + # @param [Object] number Value to be assigned + def number=(number) + if number.nil? + fail ArgumentError, 'number cannot be nil' + end + + if number > 543.2 + fail ArgumentError, 'invalid value for "number", must be smaller than or equal to 543.2.' + end + + if number < 32.1 + fail ArgumentError, 'invalid value for "number", must be greater than or equal to 32.1.' + end + + @number = number + end + + # Custom attribute writer method with validation + # @param [Object] float Value to be assigned + def float=(float) + if !float.nil? && float > 987.6 + fail ArgumentError, 'invalid value for "float", must be smaller than or equal to 987.6.' + end + + @float = float + end + + # Custom attribute writer method with validation + # @param [Object] double Value to be assigned + def double=(double) + if double.nil? + fail ArgumentError, 'double cannot be nil' + end + + if double > 123.4 + fail ArgumentError, 'invalid value for "double", must be smaller than or equal to 123.4.' + end + + if double < 67.8 + fail ArgumentError, 'invalid value for "double", must be greater than or equal to 67.8.' + end + + @double = double + end + + # Custom attribute writer method with validation + # @param [Object] string Value to be assigned + def string=(string) + pattern = Regexp.new(/[a-z]/i) + if !string.nil? && string !~ pattern + fail ArgumentError, "invalid value for \"string\", must conform to the pattern #{pattern}." + end + + @string = string + end + + # Custom attribute writer method with validation + # @param [Object] pattern_without_delimiter Value to be assigned + def pattern_without_delimiter=(pattern_without_delimiter) + if pattern_without_delimiter.nil? + fail ArgumentError, 'pattern_without_delimiter cannot be nil' + end + + pattern = Regexp.new(/^[A-Z].*/) + if pattern_without_delimiter !~ pattern + fail ArgumentError, "invalid value for \"pattern_without_delimiter\", must conform to the pattern #{pattern}." + end + + @pattern_without_delimiter = pattern_without_delimiter + end + + # Custom attribute writer method with validation + # @param [Object] password Value to be assigned + def password=(password) + if !password.nil? && password.to_s.length > 64 + fail ArgumentError, 'invalid value for "password", the character length must be smaller than or equal to 64.' + end + + if !password.nil? && password.to_s.length < 10 + fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 10.' + end + + @password = password + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + integer == o.integer && + int32 == o.int32 && + int64 == o.int64 && + number == o.number && + float == o.float && + double == o.double && + string == o.string && + pattern_without_delimiter == o.pattern_without_delimiter && + byte == o.byte && + binary == o.binary && + date == o.date && + date_time == o.date_time && + password == o.password && + callback == o.callback + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [integer, int32, int64, number, float, double, string, pattern_without_delimiter, byte, binary, date, date_time, password, callback].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Petstore.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object4.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object4.rb new file mode 100644 index 0000000000..560e747ce7 --- /dev/null +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object4.rb @@ -0,0 +1,227 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'date' + +module Petstore + class InlineObject4 + # field1 + attr_accessor :param + + # field2 + attr_accessor :param2 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'param' => :'param', + :'param2' => :'param2' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'param' => :'String', + :'param2' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject4` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject4`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'param') + self.param = attributes[:'param'] + end + + if attributes.key?(:'param2') + self.param2 = attributes[:'param2'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @param.nil? + invalid_properties.push('invalid value for "param", param cannot be nil.') + end + + if @param2.nil? + invalid_properties.push('invalid value for "param2", param2 cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @param.nil? + return false if @param2.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + param == o.param && + param2 == o.param2 + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [param, param2].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Petstore.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object5.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object5.rb new file mode 100644 index 0000000000..e75bb45298 --- /dev/null +++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_object5.rb @@ -0,0 +1,222 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'date' + +module Petstore + class InlineObject5 + # Additional data to pass to server + attr_accessor :additional_metadata + + # file to upload + attr_accessor :required_file + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'additional_metadata' => :'additionalMetadata', + :'required_file' => :'requiredFile' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'additional_metadata' => :'String', + :'required_file' => :'File' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject5` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject5`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'additional_metadata') + self.additional_metadata = attributes[:'additional_metadata'] + end + + if attributes.key?(:'required_file') + self.required_file = attributes[:'required_file'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @required_file.nil? + invalid_properties.push('invalid value for "required_file", required_file cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @required_file.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + additional_metadata == o.additional_metadata && + required_file == o.required_file + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [additional_metadata, required_file].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Petstore.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/samples/client/petstore/ruby-faraday/spec/models/inline_object1_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/inline_object1_spec.rb new file mode 100644 index 0000000000..a702fd774e --- /dev/null +++ b/samples/client/petstore/ruby-faraday/spec/models/inline_object1_spec.rb @@ -0,0 +1,47 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::InlineObject1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'InlineObject1' do + before do + # run before each test + @instance = Petstore::InlineObject1.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineObject1' do + it 'should create an instance of InlineObject1' do + expect(@instance).to be_instance_of(Petstore::InlineObject1) + end + end + describe 'test attribute "additional_metadata"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "file"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/samples/client/petstore/ruby-faraday/spec/models/inline_object2_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/inline_object2_spec.rb new file mode 100644 index 0000000000..7013915ea3 --- /dev/null +++ b/samples/client/petstore/ruby-faraday/spec/models/inline_object2_spec.rb @@ -0,0 +1,55 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::InlineObject2 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'InlineObject2' do + before do + # run before each test + @instance = Petstore::InlineObject2.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineObject2' do + it 'should create an instance of InlineObject2' do + expect(@instance).to be_instance_of(Petstore::InlineObject2) + end + end + describe 'test attribute "enum_form_string_array"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('Array', [">", "$"]) + # validator.allowable_values.each do |value| + # expect { @instance.enum_form_string_array = value }.not_to raise_error + # end + end + end + + describe 'test attribute "enum_form_string"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["_abc", "-efg", "(xyz)"]) + # validator.allowable_values.each do |value| + # expect { @instance.enum_form_string = value }.not_to raise_error + # end + end + end + +end diff --git a/samples/client/petstore/ruby-faraday/spec/models/inline_object3_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/inline_object3_spec.rb new file mode 100644 index 0000000000..4daf41b4ac --- /dev/null +++ b/samples/client/petstore/ruby-faraday/spec/models/inline_object3_spec.rb @@ -0,0 +1,119 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::InlineObject3 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'InlineObject3' do + before do + # run before each test + @instance = Petstore::InlineObject3.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineObject3' do + it 'should create an instance of InlineObject3' do + expect(@instance).to be_instance_of(Petstore::InlineObject3) + end + end + describe 'test attribute "integer"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "int32"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "int64"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "float"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "double"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "string"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "pattern_without_delimiter"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "byte"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "binary"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "date"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "date_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "password"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "callback"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/samples/client/petstore/ruby-faraday/spec/models/inline_object4_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/inline_object4_spec.rb new file mode 100644 index 0000000000..fa806f9586 --- /dev/null +++ b/samples/client/petstore/ruby-faraday/spec/models/inline_object4_spec.rb @@ -0,0 +1,47 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::InlineObject4 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'InlineObject4' do + before do + # run before each test + @instance = Petstore::InlineObject4.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineObject4' do + it 'should create an instance of InlineObject4' do + expect(@instance).to be_instance_of(Petstore::InlineObject4) + end + end + describe 'test attribute "param"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "param2"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/samples/client/petstore/ruby-faraday/spec/models/inline_object5_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/inline_object5_spec.rb new file mode 100644 index 0000000000..e2410b21bc --- /dev/null +++ b/samples/client/petstore/ruby-faraday/spec/models/inline_object5_spec.rb @@ -0,0 +1,47 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::InlineObject5 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'InlineObject5' do + before do + # run before each test + @instance = Petstore::InlineObject5.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineObject5' do + it 'should create an instance of InlineObject5' do + expect(@instance).to be_instance_of(Petstore::InlineObject5) + end + end + describe 'test attribute "additional_metadata"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "required_file"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/samples/client/petstore/ruby-faraday/spec/models/inline_object_spec.rb b/samples/client/petstore/ruby-faraday/spec/models/inline_object_spec.rb new file mode 100644 index 0000000000..c5a7db4478 --- /dev/null +++ b/samples/client/petstore/ruby-faraday/spec/models/inline_object_spec.rb @@ -0,0 +1,47 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::InlineObject +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'InlineObject' do + before do + # run before each test + @instance = Petstore::InlineObject.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineObject' do + it 'should create an instance of InlineObject' do + expect(@instance).to be_instance_of(Petstore::InlineObject) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/samples/client/petstore/ruby/.openapi-generator/FILES b/samples/client/petstore/ruby/.openapi-generator/FILES index 1bb03794c7..dff9045f9b 100644 --- a/samples/client/petstore/ruby/.openapi-generator/FILES +++ b/samples/client/petstore/ruby/.openapi-generator/FILES @@ -32,6 +32,12 @@ docs/Foo.md docs/FormatTest.md docs/HasOnlyReadOnly.md docs/HealthCheckResult.md +docs/InlineObject.md +docs/InlineObject1.md +docs/InlineObject2.md +docs/InlineObject3.md +docs/InlineObject4.md +docs/InlineObject5.md docs/InlineResponseDefault.md docs/List.md docs/MapTest.md @@ -91,6 +97,12 @@ lib/petstore/models/foo.rb lib/petstore/models/format_test.rb lib/petstore/models/has_only_read_only.rb lib/petstore/models/health_check_result.rb +lib/petstore/models/inline_object.rb +lib/petstore/models/inline_object1.rb +lib/petstore/models/inline_object2.rb +lib/petstore/models/inline_object3.rb +lib/petstore/models/inline_object4.rb +lib/petstore/models/inline_object5.rb lib/petstore/models/inline_response_default.rb lib/petstore/models/list.rb lib/petstore/models/map_test.rb @@ -113,56 +125,6 @@ lib/petstore/models/tag.rb lib/petstore/models/user.rb lib/petstore/version.rb petstore.gemspec -spec/api/another_fake_api_spec.rb -spec/api/default_api_spec.rb -spec/api/fake_api_spec.rb -spec/api/fake_classname_tags123_api_spec.rb -spec/api/pet_api_spec.rb -spec/api/store_api_spec.rb -spec/api/user_api_spec.rb spec/api_client_spec.rb spec/configuration_spec.rb -spec/models/additional_properties_class_spec.rb -spec/models/animal_spec.rb -spec/models/api_response_spec.rb -spec/models/array_of_array_of_number_only_spec.rb -spec/models/array_of_number_only_spec.rb -spec/models/array_test_spec.rb -spec/models/capitalization_spec.rb -spec/models/cat_all_of_spec.rb -spec/models/cat_spec.rb -spec/models/category_spec.rb -spec/models/class_model_spec.rb -spec/models/client_spec.rb -spec/models/dog_all_of_spec.rb -spec/models/dog_spec.rb -spec/models/enum_arrays_spec.rb -spec/models/enum_class_spec.rb -spec/models/enum_test_spec.rb -spec/models/file_schema_test_class_spec.rb -spec/models/file_spec.rb -spec/models/foo_spec.rb -spec/models/format_test_spec.rb -spec/models/has_only_read_only_spec.rb -spec/models/health_check_result_spec.rb -spec/models/inline_response_default_spec.rb -spec/models/list_spec.rb -spec/models/map_test_spec.rb -spec/models/mixed_properties_and_additional_properties_class_spec.rb -spec/models/model200_response_spec.rb -spec/models/model_return_spec.rb -spec/models/name_spec.rb -spec/models/nullable_class_spec.rb -spec/models/number_only_spec.rb -spec/models/order_spec.rb -spec/models/outer_composite_spec.rb -spec/models/outer_enum_default_value_spec.rb -spec/models/outer_enum_integer_default_value_spec.rb -spec/models/outer_enum_integer_spec.rb -spec/models/outer_enum_spec.rb -spec/models/pet_spec.rb -spec/models/read_only_first_spec.rb -spec/models/special_model_name_spec.rb -spec/models/tag_spec.rb -spec/models/user_spec.rb spec/spec_helper.rb diff --git a/samples/client/petstore/ruby/README.md b/samples/client/petstore/ruby/README.md index 35c76f3817..719039e531 100644 --- a/samples/client/petstore/ruby/README.md +++ b/samples/client/petstore/ruby/README.md @@ -141,6 +141,12 @@ Class | Method | HTTP request | Description - [Petstore::FormatTest](docs/FormatTest.md) - [Petstore::HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - [Petstore::HealthCheckResult](docs/HealthCheckResult.md) + - [Petstore::InlineObject](docs/InlineObject.md) + - [Petstore::InlineObject1](docs/InlineObject1.md) + - [Petstore::InlineObject2](docs/InlineObject2.md) + - [Petstore::InlineObject3](docs/InlineObject3.md) + - [Petstore::InlineObject4](docs/InlineObject4.md) + - [Petstore::InlineObject5](docs/InlineObject5.md) - [Petstore::InlineResponseDefault](docs/InlineResponseDefault.md) - [Petstore::List](docs/List.md) - [Petstore::MapTest](docs/MapTest.md) diff --git a/samples/client/petstore/ruby/docs/InlineObject.md b/samples/client/petstore/ruby/docs/InlineObject.md new file mode 100644 index 0000000000..f5211d4446 --- /dev/null +++ b/samples/client/petstore/ruby/docs/InlineObject.md @@ -0,0 +1,19 @@ +# Petstore::InlineObject + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | Updated name of the pet | [optional] +**status** | **String** | Updated status of the pet | [optional] + +## Code Sample + +```ruby +require 'Petstore' + +instance = Petstore::InlineObject.new(name: null, + status: null) +``` + + diff --git a/samples/client/petstore/ruby/docs/InlineObject1.md b/samples/client/petstore/ruby/docs/InlineObject1.md new file mode 100644 index 0000000000..bac17e753c --- /dev/null +++ b/samples/client/petstore/ruby/docs/InlineObject1.md @@ -0,0 +1,19 @@ +# Petstore::InlineObject1 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additional_metadata** | **String** | Additional data to pass to server | [optional] +**file** | **File** | file to upload | [optional] + +## Code Sample + +```ruby +require 'Petstore' + +instance = Petstore::InlineObject1.new(additional_metadata: null, + file: null) +``` + + diff --git a/samples/client/petstore/ruby/docs/InlineObject2.md b/samples/client/petstore/ruby/docs/InlineObject2.md new file mode 100644 index 0000000000..31118c5b26 --- /dev/null +++ b/samples/client/petstore/ruby/docs/InlineObject2.md @@ -0,0 +1,19 @@ +# Petstore::InlineObject2 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**enum_form_string_array** | **Array<String>** | Form parameter enum test (string array) | [optional] +**enum_form_string** | **String** | Form parameter enum test (string) | [optional] [default to '-efg'] + +## Code Sample + +```ruby +require 'Petstore' + +instance = Petstore::InlineObject2.new(enum_form_string_array: null, + enum_form_string: null) +``` + + diff --git a/samples/client/petstore/ruby/docs/InlineObject3.md b/samples/client/petstore/ruby/docs/InlineObject3.md new file mode 100644 index 0000000000..b6cb7ccb29 --- /dev/null +++ b/samples/client/petstore/ruby/docs/InlineObject3.md @@ -0,0 +1,43 @@ +# Petstore::InlineObject3 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**integer** | **Integer** | None | [optional] +**int32** | **Integer** | None | [optional] +**int64** | **Integer** | None | [optional] +**number** | **Float** | None | +**float** | **Float** | None | [optional] +**double** | **Float** | None | +**string** | **String** | None | [optional] +**pattern_without_delimiter** | **String** | None | +**byte** | **String** | None | +**binary** | **File** | None | [optional] +**date** | **Date** | None | [optional] +**date_time** | **DateTime** | None | [optional] +**password** | **String** | None | [optional] +**callback** | **String** | None | [optional] + +## Code Sample + +```ruby +require 'Petstore' + +instance = Petstore::InlineObject3.new(integer: null, + int32: null, + int64: null, + number: null, + float: null, + double: null, + string: null, + pattern_without_delimiter: null, + byte: null, + binary: null, + date: null, + date_time: null, + password: null, + callback: null) +``` + + diff --git a/samples/client/petstore/ruby/docs/InlineObject4.md b/samples/client/petstore/ruby/docs/InlineObject4.md new file mode 100644 index 0000000000..97179c3e37 --- /dev/null +++ b/samples/client/petstore/ruby/docs/InlineObject4.md @@ -0,0 +1,19 @@ +# Petstore::InlineObject4 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**param** | **String** | field1 | +**param2** | **String** | field2 | + +## Code Sample + +```ruby +require 'Petstore' + +instance = Petstore::InlineObject4.new(param: null, + param2: null) +``` + + diff --git a/samples/client/petstore/ruby/docs/InlineObject5.md b/samples/client/petstore/ruby/docs/InlineObject5.md new file mode 100644 index 0000000000..23c1df99ff --- /dev/null +++ b/samples/client/petstore/ruby/docs/InlineObject5.md @@ -0,0 +1,19 @@ +# Petstore::InlineObject5 + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**additional_metadata** | **String** | Additional data to pass to server | [optional] +**required_file** | **File** | file to upload | + +## Code Sample + +```ruby +require 'Petstore' + +instance = Petstore::InlineObject5.new(additional_metadata: null, + required_file: null) +``` + + diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb index f0df2170db..7f8ae56e12 100644 --- a/samples/client/petstore/ruby/lib/petstore.rb +++ b/samples/client/petstore/ruby/lib/petstore.rb @@ -40,6 +40,12 @@ require 'petstore/models/foo' require 'petstore/models/format_test' require 'petstore/models/has_only_read_only' require 'petstore/models/health_check_result' +require 'petstore/models/inline_object' +require 'petstore/models/inline_object1' +require 'petstore/models/inline_object2' +require 'petstore/models/inline_object3' +require 'petstore/models/inline_object4' +require 'petstore/models/inline_object5' require 'petstore/models/inline_response_default' require 'petstore/models/list' require 'petstore/models/map_test' diff --git a/samples/client/petstore/ruby/lib/petstore/models/inline_object.rb b/samples/client/petstore/ruby/lib/petstore/models/inline_object.rb new file mode 100644 index 0000000000..7d2ce0e05f --- /dev/null +++ b/samples/client/petstore/ruby/lib/petstore/models/inline_object.rb @@ -0,0 +1,217 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'date' + +module Petstore + class InlineObject + # Updated name of the pet + attr_accessor :name + + # Updated status of the pet + attr_accessor :status + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'status' => :'status' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'status' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + status == o.status + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, status].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Petstore.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/samples/client/petstore/ruby/lib/petstore/models/inline_object1.rb b/samples/client/petstore/ruby/lib/petstore/models/inline_object1.rb new file mode 100644 index 0000000000..45a9d5bfcd --- /dev/null +++ b/samples/client/petstore/ruby/lib/petstore/models/inline_object1.rb @@ -0,0 +1,217 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'date' + +module Petstore + class InlineObject1 + # Additional data to pass to server + attr_accessor :additional_metadata + + # file to upload + attr_accessor :file + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'additional_metadata' => :'additionalMetadata', + :'file' => :'file' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'additional_metadata' => :'String', + :'file' => :'File' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject1` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'additional_metadata') + self.additional_metadata = attributes[:'additional_metadata'] + end + + if attributes.key?(:'file') + self.file = attributes[:'file'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + additional_metadata == o.additional_metadata && + file == o.file + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [additional_metadata, file].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Petstore.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/samples/client/petstore/ruby/lib/petstore/models/inline_object2.rb b/samples/client/petstore/ruby/lib/petstore/models/inline_object2.rb new file mode 100644 index 0000000000..51784af066 --- /dev/null +++ b/samples/client/petstore/ruby/lib/petstore/models/inline_object2.rb @@ -0,0 +1,255 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'date' + +module Petstore + class InlineObject2 + # Form parameter enum test (string array) + attr_accessor :enum_form_string_array + + # Form parameter enum test (string) + attr_accessor :enum_form_string + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'enum_form_string_array' => :'enum_form_string_array', + :'enum_form_string' => :'enum_form_string' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'enum_form_string_array' => :'Array', + :'enum_form_string' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject2` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject2`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'enum_form_string_array') + if (value = attributes[:'enum_form_string_array']).is_a?(Array) + self.enum_form_string_array = value + end + end + + if attributes.key?(:'enum_form_string') + self.enum_form_string = attributes[:'enum_form_string'] + else + self.enum_form_string = '-efg' + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + enum_form_string_validator = EnumAttributeValidator.new('String', ["_abc", "-efg", "(xyz)"]) + return false unless enum_form_string_validator.valid?(@enum_form_string) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] enum_form_string Object to be assigned + def enum_form_string=(enum_form_string) + validator = EnumAttributeValidator.new('String', ["_abc", "-efg", "(xyz)"]) + unless validator.valid?(enum_form_string) + fail ArgumentError, "invalid value for \"enum_form_string\", must be one of #{validator.allowable_values}." + end + @enum_form_string = enum_form_string + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + enum_form_string_array == o.enum_form_string_array && + enum_form_string == o.enum_form_string + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [enum_form_string_array, enum_form_string].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Petstore.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/samples/client/petstore/ruby/lib/petstore/models/inline_object3.rb b/samples/client/petstore/ruby/lib/petstore/models/inline_object3.rb new file mode 100644 index 0000000000..71fe8bd38a --- /dev/null +++ b/samples/client/petstore/ruby/lib/petstore/models/inline_object3.rb @@ -0,0 +1,538 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'date' + +module Petstore + class InlineObject3 + # None + attr_accessor :integer + + # None + attr_accessor :int32 + + # None + attr_accessor :int64 + + # None + attr_accessor :number + + # None + attr_accessor :float + + # None + attr_accessor :double + + # None + attr_accessor :string + + # None + attr_accessor :pattern_without_delimiter + + # None + attr_accessor :byte + + # None + attr_accessor :binary + + # None + attr_accessor :date + + # None + attr_accessor :date_time + + # None + attr_accessor :password + + # None + attr_accessor :callback + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'integer' => :'integer', + :'int32' => :'int32', + :'int64' => :'int64', + :'number' => :'number', + :'float' => :'float', + :'double' => :'double', + :'string' => :'string', + :'pattern_without_delimiter' => :'pattern_without_delimiter', + :'byte' => :'byte', + :'binary' => :'binary', + :'date' => :'date', + :'date_time' => :'dateTime', + :'password' => :'password', + :'callback' => :'callback' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'integer' => :'Integer', + :'int32' => :'Integer', + :'int64' => :'Integer', + :'number' => :'Float', + :'float' => :'Float', + :'double' => :'Float', + :'string' => :'String', + :'pattern_without_delimiter' => :'String', + :'byte' => :'String', + :'binary' => :'File', + :'date' => :'Date', + :'date_time' => :'DateTime', + :'password' => :'String', + :'callback' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject3` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject3`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'integer') + self.integer = attributes[:'integer'] + end + + if attributes.key?(:'int32') + self.int32 = attributes[:'int32'] + end + + if attributes.key?(:'int64') + self.int64 = attributes[:'int64'] + end + + if attributes.key?(:'number') + self.number = attributes[:'number'] + end + + if attributes.key?(:'float') + self.float = attributes[:'float'] + end + + if attributes.key?(:'double') + self.double = attributes[:'double'] + end + + if attributes.key?(:'string') + self.string = attributes[:'string'] + end + + if attributes.key?(:'pattern_without_delimiter') + self.pattern_without_delimiter = attributes[:'pattern_without_delimiter'] + end + + if attributes.key?(:'byte') + self.byte = attributes[:'byte'] + end + + if attributes.key?(:'binary') + self.binary = attributes[:'binary'] + end + + if attributes.key?(:'date') + self.date = attributes[:'date'] + end + + if attributes.key?(:'date_time') + self.date_time = attributes[:'date_time'] + end + + if attributes.key?(:'password') + self.password = attributes[:'password'] + end + + if attributes.key?(:'callback') + self.callback = attributes[:'callback'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if !@integer.nil? && @integer > 100 + invalid_properties.push('invalid value for "integer", must be smaller than or equal to 100.') + end + + if !@integer.nil? && @integer < 10 + invalid_properties.push('invalid value for "integer", must be greater than or equal to 10.') + end + + if !@int32.nil? && @int32 > 200 + invalid_properties.push('invalid value for "int32", must be smaller than or equal to 200.') + end + + if !@int32.nil? && @int32 < 20 + invalid_properties.push('invalid value for "int32", must be greater than or equal to 20.') + end + + if @number.nil? + invalid_properties.push('invalid value for "number", number cannot be nil.') + end + + if @number > 543.2 + invalid_properties.push('invalid value for "number", must be smaller than or equal to 543.2.') + end + + if @number < 32.1 + invalid_properties.push('invalid value for "number", must be greater than or equal to 32.1.') + end + + if !@float.nil? && @float > 987.6 + invalid_properties.push('invalid value for "float", must be smaller than or equal to 987.6.') + end + + if @double.nil? + invalid_properties.push('invalid value for "double", double cannot be nil.') + end + + if @double > 123.4 + invalid_properties.push('invalid value for "double", must be smaller than or equal to 123.4.') + end + + if @double < 67.8 + invalid_properties.push('invalid value for "double", must be greater than or equal to 67.8.') + end + + pattern = Regexp.new(/[a-z]/i) + if !@string.nil? && @string !~ pattern + invalid_properties.push("invalid value for \"string\", must conform to the pattern #{pattern}.") + end + + if @pattern_without_delimiter.nil? + invalid_properties.push('invalid value for "pattern_without_delimiter", pattern_without_delimiter cannot be nil.') + end + + pattern = Regexp.new(/^[A-Z].*/) + if @pattern_without_delimiter !~ pattern + invalid_properties.push("invalid value for \"pattern_without_delimiter\", must conform to the pattern #{pattern}.") + end + + if @byte.nil? + invalid_properties.push('invalid value for "byte", byte cannot be nil.') + end + + if !@password.nil? && @password.to_s.length > 64 + invalid_properties.push('invalid value for "password", the character length must be smaller than or equal to 64.') + end + + if !@password.nil? && @password.to_s.length < 10 + invalid_properties.push('invalid value for "password", the character length must be great than or equal to 10.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if !@integer.nil? && @integer > 100 + return false if !@integer.nil? && @integer < 10 + return false if !@int32.nil? && @int32 > 200 + return false if !@int32.nil? && @int32 < 20 + return false if @number.nil? + return false if @number > 543.2 + return false if @number < 32.1 + return false if !@float.nil? && @float > 987.6 + return false if @double.nil? + return false if @double > 123.4 + return false if @double < 67.8 + return false if !@string.nil? && @string !~ Regexp.new(/[a-z]/i) + return false if @pattern_without_delimiter.nil? + return false if @pattern_without_delimiter !~ Regexp.new(/^[A-Z].*/) + return false if @byte.nil? + return false if !@password.nil? && @password.to_s.length > 64 + return false if !@password.nil? && @password.to_s.length < 10 + true + end + + # Custom attribute writer method with validation + # @param [Object] integer Value to be assigned + def integer=(integer) + if !integer.nil? && integer > 100 + fail ArgumentError, 'invalid value for "integer", must be smaller than or equal to 100.' + end + + if !integer.nil? && integer < 10 + fail ArgumentError, 'invalid value for "integer", must be greater than or equal to 10.' + end + + @integer = integer + end + + # Custom attribute writer method with validation + # @param [Object] int32 Value to be assigned + def int32=(int32) + if !int32.nil? && int32 > 200 + fail ArgumentError, 'invalid value for "int32", must be smaller than or equal to 200.' + end + + if !int32.nil? && int32 < 20 + fail ArgumentError, 'invalid value for "int32", must be greater than or equal to 20.' + end + + @int32 = int32 + end + + # Custom attribute writer method with validation + # @param [Object] number Value to be assigned + def number=(number) + if number.nil? + fail ArgumentError, 'number cannot be nil' + end + + if number > 543.2 + fail ArgumentError, 'invalid value for "number", must be smaller than or equal to 543.2.' + end + + if number < 32.1 + fail ArgumentError, 'invalid value for "number", must be greater than or equal to 32.1.' + end + + @number = number + end + + # Custom attribute writer method with validation + # @param [Object] float Value to be assigned + def float=(float) + if !float.nil? && float > 987.6 + fail ArgumentError, 'invalid value for "float", must be smaller than or equal to 987.6.' + end + + @float = float + end + + # Custom attribute writer method with validation + # @param [Object] double Value to be assigned + def double=(double) + if double.nil? + fail ArgumentError, 'double cannot be nil' + end + + if double > 123.4 + fail ArgumentError, 'invalid value for "double", must be smaller than or equal to 123.4.' + end + + if double < 67.8 + fail ArgumentError, 'invalid value for "double", must be greater than or equal to 67.8.' + end + + @double = double + end + + # Custom attribute writer method with validation + # @param [Object] string Value to be assigned + def string=(string) + pattern = Regexp.new(/[a-z]/i) + if !string.nil? && string !~ pattern + fail ArgumentError, "invalid value for \"string\", must conform to the pattern #{pattern}." + end + + @string = string + end + + # Custom attribute writer method with validation + # @param [Object] pattern_without_delimiter Value to be assigned + def pattern_without_delimiter=(pattern_without_delimiter) + if pattern_without_delimiter.nil? + fail ArgumentError, 'pattern_without_delimiter cannot be nil' + end + + pattern = Regexp.new(/^[A-Z].*/) + if pattern_without_delimiter !~ pattern + fail ArgumentError, "invalid value for \"pattern_without_delimiter\", must conform to the pattern #{pattern}." + end + + @pattern_without_delimiter = pattern_without_delimiter + end + + # Custom attribute writer method with validation + # @param [Object] password Value to be assigned + def password=(password) + if !password.nil? && password.to_s.length > 64 + fail ArgumentError, 'invalid value for "password", the character length must be smaller than or equal to 64.' + end + + if !password.nil? && password.to_s.length < 10 + fail ArgumentError, 'invalid value for "password", the character length must be great than or equal to 10.' + end + + @password = password + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + integer == o.integer && + int32 == o.int32 && + int64 == o.int64 && + number == o.number && + float == o.float && + double == o.double && + string == o.string && + pattern_without_delimiter == o.pattern_without_delimiter && + byte == o.byte && + binary == o.binary && + date == o.date && + date_time == o.date_time && + password == o.password && + callback == o.callback + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [integer, int32, int64, number, float, double, string, pattern_without_delimiter, byte, binary, date, date_time, password, callback].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Petstore.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/samples/client/petstore/ruby/lib/petstore/models/inline_object4.rb b/samples/client/petstore/ruby/lib/petstore/models/inline_object4.rb new file mode 100644 index 0000000000..560e747ce7 --- /dev/null +++ b/samples/client/petstore/ruby/lib/petstore/models/inline_object4.rb @@ -0,0 +1,227 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'date' + +module Petstore + class InlineObject4 + # field1 + attr_accessor :param + + # field2 + attr_accessor :param2 + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'param' => :'param', + :'param2' => :'param2' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'param' => :'String', + :'param2' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject4` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject4`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'param') + self.param = attributes[:'param'] + end + + if attributes.key?(:'param2') + self.param2 = attributes[:'param2'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @param.nil? + invalid_properties.push('invalid value for "param", param cannot be nil.') + end + + if @param2.nil? + invalid_properties.push('invalid value for "param2", param2 cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @param.nil? + return false if @param2.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + param == o.param && + param2 == o.param2 + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [param, param2].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Petstore.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/samples/client/petstore/ruby/lib/petstore/models/inline_object5.rb b/samples/client/petstore/ruby/lib/petstore/models/inline_object5.rb new file mode 100644 index 0000000000..e75bb45298 --- /dev/null +++ b/samples/client/petstore/ruby/lib/petstore/models/inline_object5.rb @@ -0,0 +1,222 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'date' + +module Petstore + class InlineObject5 + # Additional data to pass to server + attr_accessor :additional_metadata + + # file to upload + attr_accessor :required_file + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'additional_metadata' => :'additionalMetadata', + :'required_file' => :'requiredFile' + } + end + + # Attribute type mapping. + def self.openapi_types + { + :'additional_metadata' => :'String', + :'required_file' => :'File' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `Petstore::InlineObject5` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `Petstore::InlineObject5`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'additional_metadata') + self.additional_metadata = attributes[:'additional_metadata'] + end + + if attributes.key?(:'required_file') + self.required_file = attributes[:'required_file'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @required_file.nil? + invalid_properties.push('invalid value for "required_file", required_file cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @required_file.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + additional_metadata == o.additional_metadata && + required_file == o.required_file + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [additional_metadata, required_file].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end # or else data not found in attributes(hash), not an issue as the data can be optional + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :DateTime + DateTime.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + Petstore.const_get(type).build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + end +end diff --git a/samples/client/petstore/ruby/spec/models/inline_object1_spec.rb b/samples/client/petstore/ruby/spec/models/inline_object1_spec.rb new file mode 100644 index 0000000000..a702fd774e --- /dev/null +++ b/samples/client/petstore/ruby/spec/models/inline_object1_spec.rb @@ -0,0 +1,47 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::InlineObject1 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'InlineObject1' do + before do + # run before each test + @instance = Petstore::InlineObject1.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineObject1' do + it 'should create an instance of InlineObject1' do + expect(@instance).to be_instance_of(Petstore::InlineObject1) + end + end + describe 'test attribute "additional_metadata"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "file"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/samples/client/petstore/ruby/spec/models/inline_object2_spec.rb b/samples/client/petstore/ruby/spec/models/inline_object2_spec.rb new file mode 100644 index 0000000000..7013915ea3 --- /dev/null +++ b/samples/client/petstore/ruby/spec/models/inline_object2_spec.rb @@ -0,0 +1,55 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::InlineObject2 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'InlineObject2' do + before do + # run before each test + @instance = Petstore::InlineObject2.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineObject2' do + it 'should create an instance of InlineObject2' do + expect(@instance).to be_instance_of(Petstore::InlineObject2) + end + end + describe 'test attribute "enum_form_string_array"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('Array', [">", "$"]) + # validator.allowable_values.each do |value| + # expect { @instance.enum_form_string_array = value }.not_to raise_error + # end + end + end + + describe 'test attribute "enum_form_string"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["_abc", "-efg", "(xyz)"]) + # validator.allowable_values.each do |value| + # expect { @instance.enum_form_string = value }.not_to raise_error + # end + end + end + +end diff --git a/samples/client/petstore/ruby/spec/models/inline_object3_spec.rb b/samples/client/petstore/ruby/spec/models/inline_object3_spec.rb new file mode 100644 index 0000000000..4daf41b4ac --- /dev/null +++ b/samples/client/petstore/ruby/spec/models/inline_object3_spec.rb @@ -0,0 +1,119 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::InlineObject3 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'InlineObject3' do + before do + # run before each test + @instance = Petstore::InlineObject3.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineObject3' do + it 'should create an instance of InlineObject3' do + expect(@instance).to be_instance_of(Petstore::InlineObject3) + end + end + describe 'test attribute "integer"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "int32"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "int64"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "float"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "double"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "string"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "pattern_without_delimiter"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "byte"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "binary"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "date"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "date_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "password"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "callback"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/samples/client/petstore/ruby/spec/models/inline_object4_spec.rb b/samples/client/petstore/ruby/spec/models/inline_object4_spec.rb new file mode 100644 index 0000000000..fa806f9586 --- /dev/null +++ b/samples/client/petstore/ruby/spec/models/inline_object4_spec.rb @@ -0,0 +1,47 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::InlineObject4 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'InlineObject4' do + before do + # run before each test + @instance = Petstore::InlineObject4.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineObject4' do + it 'should create an instance of InlineObject4' do + expect(@instance).to be_instance_of(Petstore::InlineObject4) + end + end + describe 'test attribute "param"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "param2"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/samples/client/petstore/ruby/spec/models/inline_object5_spec.rb b/samples/client/petstore/ruby/spec/models/inline_object5_spec.rb new file mode 100644 index 0000000000..e2410b21bc --- /dev/null +++ b/samples/client/petstore/ruby/spec/models/inline_object5_spec.rb @@ -0,0 +1,47 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::InlineObject5 +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'InlineObject5' do + before do + # run before each test + @instance = Petstore::InlineObject5.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineObject5' do + it 'should create an instance of InlineObject5' do + expect(@instance).to be_instance_of(Petstore::InlineObject5) + end + end + describe 'test attribute "additional_metadata"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "required_file"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/samples/client/petstore/ruby/spec/models/inline_object_spec.rb b/samples/client/petstore/ruby/spec/models/inline_object_spec.rb new file mode 100644 index 0000000000..c5a7db4478 --- /dev/null +++ b/samples/client/petstore/ruby/spec/models/inline_object_spec.rb @@ -0,0 +1,47 @@ +=begin +#OpenAPI Petstore + +#This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ + +The version of the OpenAPI document: 1.0.0 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.0.0-SNAPSHOT + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for Petstore::InlineObject +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe 'InlineObject' do + before do + # run before each test + @instance = Petstore::InlineObject.new + end + + after do + # run after each test + end + + describe 'test an instance of InlineObject' do + it 'should create an instance of InlineObject' do + expect(@instance).to be_instance_of(Petstore::InlineObject) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/samples/client/petstore/scala-sttp/README.md b/samples/client/petstore/scala-sttp/README.md index 891ebf40fc..7d0aef8990 100644 --- a/samples/client/petstore/scala-sttp/README.md +++ b/samples/client/petstore/scala-sttp/README.md @@ -1,4 +1,4 @@ -# 'scala-sttp-petstore' +# scala-sttp-petstore OpenAPI Petstore - API version: 1.0.0 @@ -37,7 +37,7 @@ Add this dependency to your project's POM: ```xml org.openapitools - 'scala-sttp-petstore' + scala-sttp-petstore 1.0.0 compile @@ -48,13 +48,13 @@ Add this dependency to your project's POM: Add this dependency to your project's build file: ```groovy -compile "org.openapitools:'scala-sttp-petstore':1.0.0" +compile "org.openapitools:scala-sttp-petstore:1.0.0" ``` ### SBT users ```scala -libraryDependencies += "org.openapitools" % "'scala-sttp-petstore'" % "1.0.0" +libraryDependencies += "org.openapitools" % "scala-sttp-petstore" % "1.0.0" ``` ## Getting Started diff --git a/samples/client/petstore/scala-sttp/build.sbt b/samples/client/petstore/scala-sttp/build.sbt index 68b09b1d6d..b940c8b673 100644 --- a/samples/client/petstore/scala-sttp/build.sbt +++ b/samples/client/petstore/scala-sttp/build.sbt @@ -1,5 +1,5 @@ version := "1.0.0" -name := "'scala-sttp-petstore'" +name := "scala-sttp-petstore" organization := "org.openapitools" scalaVersion := "2.13.0" diff --git a/samples/client/petstore/spring-cloud-async/.openapi-generator/FILES b/samples/client/petstore/spring-cloud-async/.openapi-generator/FILES index d4c572c593..3510d2b2d2 100644 --- a/samples/client/petstore/spring-cloud-async/.openapi-generator/FILES +++ b/samples/client/petstore/spring-cloud-async/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md pom.xml src/main/java/org/openapitools/api/PetApi.java diff --git a/samples/client/petstore/spring-cloud/.openapi-generator/FILES b/samples/client/petstore/spring-cloud/.openapi-generator/FILES index d4c572c593..3510d2b2d2 100644 --- a/samples/client/petstore/spring-cloud/.openapi-generator/FILES +++ b/samples/client/petstore/spring-cloud/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md pom.xml src/main/java/org/openapitools/api/PetApi.java diff --git a/samples/client/petstore/swift5/alamofireLibrary/Package.swift b/samples/client/petstore/swift5/alamofireLibrary/Package.swift index 9371b3d57b..6e820c6971 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/Package.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/Package.swift @@ -14,19 +14,19 @@ let package = Package( // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "PetstoreClient", - targets: ["PetstoreClient"]) + targets: ["PetstoreClient"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.1") + .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.9.1"), ], 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" ], + dependencies: ["Alamofire", ], path: "PetstoreClient/Classes" - ) + ), ] ) diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 5b09f95571..2404bc8ffc 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -7,7 +7,7 @@ import Foundation public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + 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 @@ -20,17 +20,17 @@ public struct APIHelper { return destination } - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + 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: ",") + if let collection = item.value as? Array { + 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]? { + public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { guard let source = source else { return nil } @@ -46,15 +46,15 @@ public struct APIHelper { } public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { + if let collection = source as? Array { return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") } return source } - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + 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?] { + if let collection = item.value as? Array { collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } @@ -69,3 +69,4 @@ public struct APIHelper { return destination } } + diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift index 224d1fc911..69e723d482 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,23 +9,23 @@ 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 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]? + 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)? + public var onProgressReady: ((Progress) -> ())? - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters @@ -35,7 +35,7 @@ open class RequestBuilder { addHeaders(PetstoreClientAPI.customHeaders) } - open func addHeaders(_ aHeaders: [String: String]) { + open func addHeaders(_ aHeaders:[String:String]) { for (header, value) in aHeaders { headers[header] = value } @@ -58,5 +58,5 @@ open class RequestBuilder { public protocol RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type } diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 5bbf323f82..bb3ae71782 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class AnotherFakeAPI { /** To test special tags @@ -15,7 +17,7 @@ open class AnotherFakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 134d6aea41..d1d81faa33 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class FakeAPI { /** @@ -14,7 +16,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { + open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?,_ error: Error?) -> Void)) { fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -49,7 +51,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?,_ error: Error?) -> Void)) { fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -84,7 +86,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { + open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?,_ error: Error?) -> Void)) { fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -119,7 +121,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -154,7 +156,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -190,7 +192,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -229,7 +231,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -279,7 +281,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, 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(apiResponseQueue) { result -> Void in switch result { case .success: @@ -316,7 +318,7 @@ open class FakeAPI { 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?] = [ + let formParams: [String:Any?] = [ "integer": integer?.encodeToJSON(), "int32": int32?.encodeToJSON(), "int64": int64?.encodeToJSON(), @@ -335,7 +337,7 @@ open class FakeAPI { let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -424,7 +426,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, 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(apiResponseQueue) { result -> Void in switch result { case .success: @@ -452,19 +454,19 @@ open class FakeAPI { 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?] = [ + 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_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), "enum_query_double": enumQueryDouble?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -490,7 +492,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -516,13 +518,13 @@ open class FakeAPI { 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 - + 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(), + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), "int64_group": int64Group?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -543,7 +545,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testInlineAdditionalProperties(param: [String:String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -560,7 +562,7 @@ open class FakeAPI { - parameter param: (body) request body - returns: RequestBuilder */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> 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) @@ -580,7 +582,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -601,14 +603,14 @@ open class FakeAPI { open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { let path = "/fake/jsonFormData" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + 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() diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index 48cfe7187b..d21c4a49d4 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -7,6 +7,8 @@ import Foundation + + open class FakeClassnameTags123API { /** To test class name in snake case @@ -15,7 +17,7 @@ open class FakeClassnameTags123API { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index c938db7200..f5366f5832 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class PetAPI { /** Add a new pet to the store @@ -15,7 +17,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -55,7 +57,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -82,8 +84,8 @@ open class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let nillableHeaders: [String: Any?] = [ "api_key": apiKey?.encodeToJSON() @@ -111,7 +113,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -135,8 +137,8 @@ open class PetAPI { open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "status": status.encodeToJSON() @@ -155,7 +157,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ @available(*, deprecated, message: "This operation is deprecated.") - open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -180,8 +182,8 @@ open class PetAPI { open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tags": tags.encodeToJSON() @@ -199,7 +201,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { + open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?,_ error: Error?) -> Void)) { getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -226,8 +228,8 @@ open class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -242,7 +244,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -283,7 +285,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -311,14 +313,14 @@ open class PetAPI { 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?] = [ + 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() @@ -335,7 +337,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -363,14 +365,14 @@ open class PetAPI { 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?] = [ + 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() @@ -387,7 +389,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -415,14 +417,14 @@ open class PetAPI { 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?] = [ + 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() diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index a8a83eda39..3848eda85a 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class StoreAPI { /** Delete purchase order by ID @@ -15,7 +17,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -39,8 +41,8 @@ open class StoreAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -54,7 +56,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String:Int]?,_ error: Error?) -> Void)) { getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -74,14 +76,14 @@ open class StoreAPI { - name: api_key - returns: RequestBuilder<[String:Int]> */ - open class func getInventoryWithRequestBuilder() -> 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + let requestBuilder: RequestBuilder<[String:Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } @@ -93,7 +95,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -117,8 +119,8 @@ open class StoreAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -133,7 +135,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index 505ed1b0c5..546166841d 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class UserAPI { /** Create user @@ -15,7 +17,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -52,7 +54,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -88,7 +90,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -124,7 +126,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -148,8 +150,8 @@ open class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -164,7 +166,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { + open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?,_ error: Error?) -> Void)) { getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -187,8 +189,8 @@ open class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -204,7 +206,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -226,11 +228,11 @@ open class UserAPI { open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), + "username": username.encodeToJSON(), "password": password.encodeToJSON() ]) @@ -245,7 +247,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -264,8 +266,8 @@ open class UserAPI { open class func logoutUserWithRequestBuilder() -> RequestBuilder { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -281,7 +283,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift index 368b4edffb..e7320f28ec 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/AlamofireImplementations.swift @@ -12,7 +12,7 @@ class AlamofireRequestBuilderFactory: RequestBuilderFactory { return AlamofireRequestBuilder.self } - func getBuilder() -> RequestBuilder.Type { + func getBuilder() -> RequestBuilder.Type { return AlamofireDecodableRequestBuilder.self } } @@ -21,7 +21,7 @@ class AlamofireRequestBuilderFactory: RequestBuilderFactory { private var managerStore = SynchronizedDictionary() open class AlamofireRequestBuilder: RequestBuilder { - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + 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) } @@ -59,17 +59,17 @@ open class AlamofireRequestBuilder: RequestBuilder { 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 { + 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(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { - let managerId: String = UUID().uuidString + 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 encoding:ParameterEncoding = isBody ? JSONDataEncoding() : URLEncoding() let xMethod = Alamofire.HTTPMethod(rawValue: method) let fileKeys = parameters == nil ? [] : parameters!.filter { $1 is NSURL } @@ -82,7 +82,8 @@ open class AlamofireRequestBuilder: RequestBuilder { case let fileURL as URL: if let mimeType = self.contentTypeForFormPart(fileURL: fileURL) { mpForm.append(fileURL, withName: k, fileName: fileURL.lastPathComponent, mimeType: mimeType) - } else { + } + else { mpForm.append(fileURL, withName: k) } case let string as String: @@ -101,7 +102,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } self.processRequest(request: upload, managerId, apiResponseQueue, completion) case .failure(let encodingError): - apiResponseQueue.async { + apiResponseQueue.async{ completion(.failure(ErrorResponse.error(415, nil, encodingError))) } } @@ -131,14 +132,14 @@ open class AlamofireRequestBuilder: RequestBuilder { case is String.Type: validatedRequest.responseString(queue: apiResponseQueue, completionHandler: { (stringResponse) in cleanupRequest() - + switch stringResponse.result { case let .success(value): completion(.success(Response(response: stringResponse.response!, body: value as? T))) case let .failure(error): completion(.failure(ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, error))) } - + }) case is URL.Type: validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (dataResponse) in @@ -187,26 +188,26 @@ open class AlamofireRequestBuilder: RequestBuilder { case is Void.Type: validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (voidResponse) in cleanupRequest() - + switch voidResponse.result { case .success: completion(.success(Response(response: voidResponse.response!, body: nil))) case let .failure(error): completion(.failure(ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, error))) } - + }) default: validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (dataResponse) in cleanupRequest() - + switch dataResponse.result { case .success: completion(.success(Response(response: dataResponse.response!, body: dataResponse.data as? T))) case let .failure(error): completion(.failure(ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, error))) } - + }) } } @@ -219,7 +220,7 @@ open class AlamofireRequestBuilder: RequestBuilder { return httpHeaders } - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { guard let contentDisposition = contentDisposition else { return nil @@ -227,7 +228,7 @@ open class AlamofireRequestBuilder: RequestBuilder { let items = contentDisposition.components(separatedBy: ";") - var filename: String? + var filename : String? = nil for contentItem in items { @@ -238,7 +239,7 @@ open class AlamofireRequestBuilder: RequestBuilder { filename = contentItem return filename? - .replacingCharacters(in: range, with: "") + .replacingCharacters(in: range, with:"") .replacingOccurrences(of: "\"", with: "") .trimmingCharacters(in: .whitespacesAndNewlines) } @@ -247,7 +248,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } - fileprivate func getPath(from url: URL) throws -> String { + fileprivate func getPath(from url : URL) throws -> String { guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { throw DownloadException.requestMissingPath @@ -261,7 +262,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { guard let url = urlRequest.url else { throw DownloadException.requestMissingURL @@ -272,7 +273,7 @@ open class AlamofireRequestBuilder: RequestBuilder { } -open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { +open class AlamofireDecodableRequestBuilder: AlamofireRequestBuilder { override fileprivate func processRequest(request: DataRequest, _ managerId: String, _ apiResponseQueue: DispatchQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let credential = self.credential { @@ -289,7 +290,7 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild case is String.Type: validatedRequest.responseString(queue: apiResponseQueue, completionHandler: { (stringResponse) in cleanupRequest() - + switch stringResponse.result { case let .success(value): completion(.success(Response(response: stringResponse.response!, body: value as? T))) @@ -301,7 +302,7 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild case is Void.Type: validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (voidResponse) in cleanupRequest() - + switch voidResponse.result { case .success: completion(.success(Response(response: voidResponse.response!, body: nil))) @@ -313,7 +314,7 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild case is Data.Type: validatedRequest.responseData(queue: apiResponseQueue, completionHandler: { (dataResponse) in cleanupRequest() - + switch dataResponse.result { case .success: completion(.success(Response(response: dataResponse.response!, body: dataResponse.data as? T))) @@ -342,14 +343,14 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild } let decodeResult = CodableHelper.decode(T.self, from: data) - + switch decodeResult { case let .success(decodableObj): completion(.success(Response(response: httpResponse, body: decodableObj))) case let .failure(error): completion(.failure(ErrorResponse.error(httpResponse.statusCode, data, error))) } - + }) } } @@ -357,9 +358,9 @@ open class AlamofireDecodableRequestBuilder: AlamofireRequestBuild } extension JSONDataEncoding: ParameterEncoding { - + // MARK: Encoding - + /// Creates a URL request by encoding parameters and applying them onto an existing request. /// /// - parameter urlRequest: The request to have parameters applied. @@ -371,7 +372,7 @@ extension JSONDataEncoding: ParameterEncoding { /// - returns: The encoded request. public func encode(_ urlRequest: URLRequestConvertible, with parameters: Parameters?) throws -> URLRequest { let urlRequest = try urlRequest.asURLRequest() - + return self.encode(urlRequest, with: parameters) } } diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift index ef971ebadc..01b28a4bd4 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -45,4 +45,4 @@ open class CodableHelper { open class func encode(_ value: T) -> Swift.Result where T: Encodable { return Swift.Result { try self.jsonEncoder.encode(value) } } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift index 627d9adb75..f171525e43 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -7,10 +7,10 @@ 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. @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} + +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 93ed6b90b3..6e279679c6 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -108,24 +108,24 @@ extension String: CodingKey { extension KeyedEncodingContainerProtocol { - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + 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 { + 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 { + 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 { + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { if let pairs = pairs { try encodeMap(pairs) } @@ -135,7 +135,7 @@ extension KeyedEncodingContainerProtocol { extension KeyedDecodingContainerProtocol { - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { var tmpArray = [T]() var nestedContainer = try nestedUnkeyedContainer(forKey: key) @@ -147,8 +147,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil if contains(key) { tmpArray = try decodeArray(T.self, forKey: key) @@ -157,8 +157,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] + 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) { @@ -177,3 +177,5 @@ extension HTTPURLResponse { return Array(200 ..< 300).contains(statusCode) } } + + diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64..08f1ef334d 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -41,7 +41,7 @@ public struct JSONDataEncoding { } public static func encodingParameters(jsonData: Data?) -> [String: Any]? { - var returnedParams: [String: Any]? + var returnedParams: [String: Any]? = nil if let jsonData = jsonData, !jsonData.isEmpty { var params: [String: Any] = [:] params[jsonDataKey] = jsonData diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 02f78ffb47..314f1eff1f 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -9,8 +9,8 @@ import Foundation open class JSONEncodingHelper { - open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { - var params: [String: Any]? + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? = nil // Encode the Encodable object if let encodableObj = encodableObj { @@ -27,7 +27,7 @@ open class JSONEncodingHelper { } open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { - var params: [String: Any]? + var params: [String: Any]? = nil if let encodableObj = encodableObj { do { @@ -41,5 +41,5 @@ open class JSONEncodingHelper { return params } - + } diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift index c0542c14c0..11e81ffcc4 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,11 +10,11 @@ protocol JSONEncodable { func encodeToJSON() -> Any } -public enum ErrorResponse: Error { +public enum ErrorResponse : Error { case error(Int, Data?, Error) } -public enum DownloadException: Error { +public enum DownloadException : Error { case responseDataMissing case responseFailed case requestMissing @@ -30,6 +30,7 @@ public enum DecodableRequestBuilderError: Error { case generalError(Error) } + open class Response { public let statusCode: Int public let header: [String: String] @@ -43,7 +44,7 @@ open class Response { public convenience init(response: HTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String: String]() + var header = [String:String]() for (key, value) in rawHeader { if let key = key.base as? String, let value = value as? String { header[key] = value diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 1af0315359..28ca8377b8 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -7,17 +7,19 @@ import Foundation -public struct AdditionalPropertiesClass: Codable { - public var mapString: [String: String]? - public var mapMapString: [String: [String: String]]? +public struct AdditionalPropertiesClass: Codable { - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + + 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, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case mapString = "map_string" case mapMapString = "map_map_string" } diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index 5ed9f31e2a..1050d79dbe 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -7,7 +7,9 @@ import Foundation -public struct Animal: Codable { + +public struct Animal: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift index e09b0e9efd..e7bea63f8e 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -7,4 +7,5 @@ import Foundation + public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index ec270da890..4d0393b9ba 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -7,7 +7,9 @@ import Foundation -public struct ApiResponse: Codable { + +public struct ApiResponse: Codable { + public var code: Int? public var type: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 6c252ed475..1363c96394 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayOfArrayOfNumberOnly: Codable { + +public struct ArrayOfArrayOfNumberOnly: Codable { + public var arrayArrayNumber: [[Double]]? @@ -15,7 +17,7 @@ public struct ArrayOfArrayOfNumberOnly: Codable { self.arrayArrayNumber = arrayArrayNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayArrayNumber = "ArrayArrayNumber" } diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index e84eb5d650..6b8873730c 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayOfNumberOnly: Codable { + +public struct ArrayOfNumberOnly: Codable { + public var arrayNumber: [Double]? @@ -15,7 +17,7 @@ public struct ArrayOfNumberOnly: Codable { self.arrayNumber = arrayNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayNumber = "ArrayNumber" } diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index d2140933d1..64f7c6d9db 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayTest: Codable { + +public struct ArrayTest: Codable { + public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? @@ -19,7 +21,7 @@ public struct ArrayTest: Codable { self.arrayArrayOfModel = arrayArrayOfModel } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayOfString = "array_of_string" case arrayArrayOfInteger = "array_array_of_integer" case arrayArrayOfModel = "array_array_of_model" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index d1b3b27616..ddb669a590 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -7,7 +7,9 @@ import Foundation -public struct Capitalization: Codable { + +public struct Capitalization: Codable { + public var smallCamel: String? public var capitalCamel: String? @@ -26,7 +28,7 @@ public struct Capitalization: Codable { self.ATT_NAME = ATT_NAME } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case smallCamel case capitalCamel = "CapitalCamel" case smallSnake = "small_Snake" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 7ab887f311..c4f6e0d488 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -7,7 +7,9 @@ import Foundation -public struct Cat: Codable { + +public struct Cat: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index a51ad0dffa..7b1d7e32be 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -7,7 +7,9 @@ import Foundation -public struct CatAllOf: Codable { + +public struct CatAllOf: Codable { + public var declawed: Bool? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index eb8f7e5e19..3ec00f5ab1 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,7 +7,9 @@ import Foundation -public struct Category: Codable { + +public struct Category: Codable { + public var id: Int64? public var name: String = "default-name" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index e2a7d4427a..af030c3dd6 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable { +public struct ClassModel: Codable { + public var _class: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 00245ca372..0aae748c76 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -7,7 +7,9 @@ import Foundation -public struct Client: Codable { + +public struct Client: Codable { + public var client: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 492c122800..198e28b94d 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -7,7 +7,9 @@ import Foundation -public struct Dog: Codable { + +public struct Dog: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 7786f8acc5..8ff49b2af2 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -7,7 +7,9 @@ import Foundation -public struct DogAllOf: Codable { + +public struct DogAllOf: Codable { + public var breed: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 9844e7c40e..e2d3fa04f9 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -7,7 +7,9 @@ import Foundation -public struct EnumArrays: Codable { + +public struct EnumArrays: Codable { + public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" @@ -25,7 +27,7 @@ public struct EnumArrays: Codable { self.arrayEnum = arrayEnum } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case justSymbol = "just_symbol" case arrayEnum = "array_enum" } diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift index d4029d73f8..c2c639ba32 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -7,6 +7,7 @@ import Foundation + public enum EnumClass: String, Codable, CaseIterable { case abc = "_abc" case efg = "-efg" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 789f583e1d..a56e1f3638 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct EnumTest: Codable { + +public struct EnumTest: Codable { + public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" @@ -41,7 +43,7 @@ public struct EnumTest: Codable { self.outerEnum = outerEnum } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case enumString = "enum_string" case enumStringRequired = "enum_string_required" case enumInteger = "enum_integer" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift index abf3ccffc4..773b53b2cb 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -8,7 +8,8 @@ import Foundation /** Must be named `File` for test. */ -public struct File: Codable { +public struct File: Codable { + /** Test capitalization */ public var sourceURI: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 532f145793..83dc1148cf 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -7,7 +7,9 @@ import Foundation -public struct FileSchemaTestClass: Codable { + +public struct FileSchemaTestClass: Codable { + public var file: File? public var files: [File]? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 20bd6d103b..bccd3f9fb1 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct FormatTest: Codable { + +public struct FormatTest: Codable { + public var integer: Int? public var int32: Int? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 906ddb06fb..566d71a35e 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct HasOnlyReadOnly: Codable { + +public struct HasOnlyReadOnly: Codable { + public var bar: String? public var foo: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift index fe13d302cc..80cecab242 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -7,7 +7,9 @@ import Foundation -public struct List: Codable { + +public struct List: Codable { + public var _123list: String? @@ -15,7 +17,7 @@ public struct List: Codable { self._123list = _123list } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _123list = "123-list" } diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 4b6037f378..f0c02de95f 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -7,25 +7,27 @@ import Foundation -public struct MapTest: Codable { + +public struct MapTest: Codable { + public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" case lower = "lower" } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? + 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?) { + 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, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case mapMapOfString = "map_map_of_string" case mapOfEnumString = "map_of_enum_string" case directMap = "direct_map" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c3deb2f289..710e62a9b5 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -7,13 +7,15 @@ import Foundation -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + public var uuid: UUID? public var dateTime: Date? - public var map: [String: Animal]? + public var map: [String:Animal]? - public init(uuid: UUID?, dateTime: Date?, 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/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index b61db7d6e7..450a53b918 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model name starting with number */ -public struct Model200Response: Codable { +public struct Model200Response: Codable { + public var name: Int? public var _class: String? @@ -18,7 +19,7 @@ public struct Model200Response: Codable { self._class = _class } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case name case _class = "class" } diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 8ab4db44b7..6deb69fcd7 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model name same as property name */ -public struct Name: Codable { +public struct Name: Codable { + public var name: Int public var snakeCase: Int? @@ -22,7 +23,7 @@ public struct Name: Codable { self._123number = _123number } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case name case snakeCase = "snake_case" case property diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 4d1dafcc2c..0c9ee2b7b9 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct NumberOnly: Codable { + +public struct NumberOnly: Codable { + public var justNumber: Double? @@ -15,7 +17,7 @@ public struct NumberOnly: Codable { self.justNumber = justNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case justNumber = "JustNumber" } diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index 40c30cc860..ab0eac0b30 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,7 +7,9 @@ import Foundation -public struct Order: Codable { + +public struct Order: Codable { + public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index 18c3a024f1..4a7d227104 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -7,7 +7,9 @@ import Foundation -public struct OuterComposite: Codable { + +public struct OuterComposite: Codable { + public var myNumber: Double? public var myString: String? @@ -19,7 +21,7 @@ public struct OuterComposite: Codable { self.myBoolean = myBoolean } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case myNumber = "my_number" case myString = "my_string" case myBoolean = "my_boolean" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift index c3b778cbbe..9e6b8d74e8 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -7,6 +7,7 @@ import Foundation + public enum OuterEnum: String, Codable, CaseIterable { case placed = "placed" case approved = "approved" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index b9ce0e9332..a973071d6c 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,7 +7,9 @@ import Foundation -public struct Pet: Codable { + +public struct Pet: Codable { + public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 0acd21fd10..b2a6b7e2b8 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -7,7 +7,9 @@ import Foundation -public struct ReadOnlyFirst: Codable { + +public struct ReadOnlyFirst: Codable { + public var bar: String? public var baz: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index c223f993a6..7e089dcee2 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing reserved words */ -public struct Return: Codable { +public struct Return: Codable { + public var _return: Int? @@ -16,7 +17,7 @@ public struct Return: Codable { self._return = _return } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _return = "return" } diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index 6e8650f76d..e890ef9525 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -7,7 +7,9 @@ import Foundation -public struct SpecialModelName: Codable { + +public struct SpecialModelName: Codable { + public var specialPropertyName: Int64? @@ -15,7 +17,7 @@ public struct SpecialModelName: Codable { self.specialPropertyName = specialPropertyName } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case specialPropertyName = "$special[property.name]" } diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 3f1237fee4..f65ae0623d 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -7,9 +7,12 @@ import Foundation -public struct StringBooleanMap: Codable { - public var additionalProperties: [String: Bool] = [:] +public struct StringBooleanMap: Codable { + + + + public var additionalProperties: [String:Bool] = [:] public subscript(key: String) -> Bool? { get { @@ -42,4 +45,5 @@ public struct StringBooleanMap: Codable { additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) } + } diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 4dd8a9a9f5..a91b6061bc 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,7 +7,9 @@ import Foundation -public struct Tag: Codable { + +public struct Tag: Codable { + public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index a9e088808e..2d377c3edb 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -7,7 +7,9 @@ import Foundation -public struct TypeHolderDefault: Codable { + +public struct TypeHolderDefault: Codable { + public var stringItem: String = "what" public var numberItem: Double @@ -23,7 +25,7 @@ public struct TypeHolderDefault: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index dff4083ae4..e5eb92da69 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -7,7 +7,9 @@ import Foundation -public struct TypeHolderExample: Codable { + +public struct TypeHolderExample: Codable { + public var stringItem: String public var numberItem: Double @@ -23,7 +25,7 @@ public struct TypeHolderExample: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 79f271ed73..f70328ca9e 100644 --- a/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/alamofireLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,7 +7,9 @@ import Foundation -public struct User: Codable { + +public struct User: Codable { + public var id: Int64? public var username: String? diff --git a/samples/client/petstore/swift5/combineLibrary/Package.swift b/samples/client/petstore/swift5/combineLibrary/Package.swift index 96dfff54ed..79f6f81887 100644 --- a/samples/client/petstore/swift5/combineLibrary/Package.swift +++ b/samples/client/petstore/swift5/combineLibrary/Package.swift @@ -14,7 +14,7 @@ let package = Package( // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "PetstoreClient", - targets: ["PetstoreClient"]) + targets: ["PetstoreClient"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. @@ -26,6 +26,6 @@ let package = Package( name: "PetstoreClient", dependencies: [], path: "PetstoreClient/Classes" - ) + ), ] ) diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 5b09f95571..2404bc8ffc 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -7,7 +7,7 @@ import Foundation public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + 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 @@ -20,17 +20,17 @@ public struct APIHelper { return destination } - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + 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: ",") + if let collection = item.value as? Array { + 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]? { + public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { guard let source = source else { return nil } @@ -46,15 +46,15 @@ public struct APIHelper { } public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { + if let collection = source as? Array { return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") } return source } - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + 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?] { + if let collection = item.value as? Array { collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } @@ -69,3 +69,4 @@ public struct APIHelper { return destination } } + diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift index a5c2d605df..c5d1b9b42d 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,15 +9,15 @@ 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 customHeaders: [String:String] = [:] public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() public static var apiResponseQueue: DispatchQueue = .main } open class RequestBuilder { var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? + var headers: [String:String] + public let parameters: [String:Any]? public let isBody: Bool public let method: String public let URLString: String @@ -25,9 +25,9 @@ open class RequestBuilder { /// Optional block to obtain a reference to the request's progress instance when available. /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. /// If you need to get the request's progress in older OS versions, please use Alamofire http client. - public var onProgressReady: ((Progress) -> Void)? + public var onProgressReady: ((Progress) -> ())? - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters @@ -37,7 +37,7 @@ open class RequestBuilder { addHeaders(PetstoreClientAPI.customHeaders) } - open func addHeaders(_ aHeaders: [String: String]) { + open func addHeaders(_ aHeaders:[String:String]) { for (header, value) in aHeaders { headers[header] = value } @@ -60,5 +60,5 @@ open class RequestBuilder { public protocol RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type } diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 2df909dec9..cf5a4a61c2 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -8,6 +8,8 @@ import Foundation import Combine + + open class AnotherFakeAPI { /** To test special tags diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 47510b7781..ccfdc07233 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -8,6 +8,8 @@ import Foundation import Combine + + open class FakeAPI { /** @@ -341,7 +343,7 @@ open class FakeAPI { 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?] = [ + let formParams: [String:Any?] = [ "integer": integer?.encodeToJSON(), "int32": int32?.encodeToJSON(), "int64": int64?.encodeToJSON(), @@ -360,7 +362,7 @@ open class FakeAPI { let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -480,19 +482,19 @@ open class FakeAPI { 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?] = [ + 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_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), "enum_query_double": enumQueryDouble?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -547,13 +549,13 @@ open class FakeAPI { 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 - + 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(), + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), "int64_group": int64Group?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -575,7 +577,7 @@ open class FakeAPI { - returns: AnyPublisher */ @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) - open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { + open class func testInlineAdditionalProperties(param: [String:String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher { return Future.init { promisse in testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in switch result { @@ -594,7 +596,7 @@ open class FakeAPI { - parameter param: (body) request body - returns: RequestBuilder */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> 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) @@ -638,14 +640,14 @@ open class FakeAPI { open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { let path = "/fake/jsonFormData" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + 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() diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index 6f0401af88..7d04bd796b 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -8,6 +8,8 @@ import Foundation import Combine + + open class FakeClassnameTags123API { /** To test class name in snake case diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 309ee4e968..6c288c225c 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -8,6 +8,8 @@ import Foundation import Combine + + open class PetAPI { /** Add a new pet to the store @@ -89,8 +91,8 @@ open class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let nillableHeaders: [String: Any?] = [ "api_key": apiKey?.encodeToJSON() @@ -145,8 +147,8 @@ open class PetAPI { open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "status": status.encodeToJSON() @@ -193,8 +195,8 @@ open class PetAPI { open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tags": tags.encodeToJSON() @@ -242,8 +244,8 @@ open class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -333,14 +335,14 @@ open class PetAPI { 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?] = [ + 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() @@ -388,14 +390,14 @@ open class PetAPI { 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?] = [ + 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() @@ -443,14 +445,14 @@ open class PetAPI { 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?] = [ + 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() diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index b36a3a30c3..1a4392975b 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -8,6 +8,8 @@ import Foundation import Combine + + open class StoreAPI { /** Delete purchase order by ID @@ -43,8 +45,8 @@ open class StoreAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -59,8 +61,8 @@ open class StoreAPI { - returns: AnyPublisher<[String:Int], Error> */ @available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *) - open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher<[String: Int], Error> { - return Future<[String: Int], Error>.init { promisse in + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> AnyPublisher<[String:Int], Error> { + return Future<[String:Int], Error>.init { promisse in getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -81,14 +83,14 @@ open class StoreAPI { - name: api_key - returns: RequestBuilder<[String:Int]> */ - open class func getInventoryWithRequestBuilder() -> 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + let requestBuilder: RequestBuilder<[String:Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } @@ -127,8 +129,8 @@ open class StoreAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index 3d5694cc93..59fec6d34f 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -8,6 +8,8 @@ import Foundation import Combine + + open class UserAPI { /** Create user @@ -161,8 +163,8 @@ open class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -203,8 +205,8 @@ open class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -245,11 +247,11 @@ open class UserAPI { open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), + "username": username.encodeToJSON(), "password": password.encodeToJSON() ]) @@ -286,8 +288,8 @@ open class UserAPI { open class func logoutUserWithRequestBuilder() -> RequestBuilder { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift index ef971ebadc..01b28a4bd4 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -45,4 +45,4 @@ open class CodableHelper { open class func encode(_ value: T) -> Swift.Result where T: Encodable { return Swift.Result { try self.jsonEncoder.encode(value) } } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift index 627d9adb75..f171525e43 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -7,10 +7,10 @@ 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. @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} + +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 93ed6b90b3..6e279679c6 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -108,24 +108,24 @@ extension String: CodingKey { extension KeyedEncodingContainerProtocol { - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + 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 { + 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 { + 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 { + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { if let pairs = pairs { try encodeMap(pairs) } @@ -135,7 +135,7 @@ extension KeyedEncodingContainerProtocol { extension KeyedDecodingContainerProtocol { - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { var tmpArray = [T]() var nestedContainer = try nestedUnkeyedContainer(forKey: key) @@ -147,8 +147,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil if contains(key) { tmpArray = try decodeArray(T.self, forKey: key) @@ -157,8 +157,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] + 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) { @@ -177,3 +177,5 @@ extension HTTPURLResponse { return Array(200 ..< 300).contains(statusCode) } } + + diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64..08f1ef334d 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -41,7 +41,7 @@ public struct JSONDataEncoding { } public static func encodingParameters(jsonData: Data?) -> [String: Any]? { - var returnedParams: [String: Any]? + var returnedParams: [String: Any]? = nil if let jsonData = jsonData, !jsonData.isEmpty { var params: [String: Any] = [:] params[jsonDataKey] = jsonData diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 02f78ffb47..314f1eff1f 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -9,8 +9,8 @@ import Foundation open class JSONEncodingHelper { - open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { - var params: [String: Any]? + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? = nil // Encode the Encodable object if let encodableObj = encodableObj { @@ -27,7 +27,7 @@ open class JSONEncodingHelper { } open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { - var params: [String: Any]? + var params: [String: Any]? = nil if let encodableObj = encodableObj { do { @@ -41,5 +41,5 @@ open class JSONEncodingHelper { return params } - + } diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift index c0542c14c0..11e81ffcc4 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,11 +10,11 @@ protocol JSONEncodable { func encodeToJSON() -> Any } -public enum ErrorResponse: Error { +public enum ErrorResponse : Error { case error(Int, Data?, Error) } -public enum DownloadException: Error { +public enum DownloadException : Error { case responseDataMissing case responseFailed case requestMissing @@ -30,6 +30,7 @@ public enum DecodableRequestBuilderError: Error { case generalError(Error) } + open class Response { public let statusCode: Int public let header: [String: String] @@ -43,7 +44,7 @@ open class Response { public convenience init(response: HTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String: String]() + var header = [String:String]() for (key, value) in rawHeader { if let key = key.base as? String, let value = value as? String { header[key] = value diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 1af0315359..28ca8377b8 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -7,17 +7,19 @@ import Foundation -public struct AdditionalPropertiesClass: Codable { - public var mapString: [String: String]? - public var mapMapString: [String: [String: String]]? +public struct AdditionalPropertiesClass: Codable { - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + + 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, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case mapString = "map_string" case mapMapString = "map_map_string" } diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index 5ed9f31e2a..1050d79dbe 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -7,7 +7,9 @@ import Foundation -public struct Animal: Codable { + +public struct Animal: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift index e09b0e9efd..e7bea63f8e 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -7,4 +7,5 @@ import Foundation + public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index ec270da890..4d0393b9ba 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -7,7 +7,9 @@ import Foundation -public struct ApiResponse: Codable { + +public struct ApiResponse: Codable { + public var code: Int? public var type: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 6c252ed475..1363c96394 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayOfArrayOfNumberOnly: Codable { + +public struct ArrayOfArrayOfNumberOnly: Codable { + public var arrayArrayNumber: [[Double]]? @@ -15,7 +17,7 @@ public struct ArrayOfArrayOfNumberOnly: Codable { self.arrayArrayNumber = arrayArrayNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayArrayNumber = "ArrayArrayNumber" } diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index e84eb5d650..6b8873730c 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayOfNumberOnly: Codable { + +public struct ArrayOfNumberOnly: Codable { + public var arrayNumber: [Double]? @@ -15,7 +17,7 @@ public struct ArrayOfNumberOnly: Codable { self.arrayNumber = arrayNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayNumber = "ArrayNumber" } diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index d2140933d1..64f7c6d9db 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayTest: Codable { + +public struct ArrayTest: Codable { + public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? @@ -19,7 +21,7 @@ public struct ArrayTest: Codable { self.arrayArrayOfModel = arrayArrayOfModel } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayOfString = "array_of_string" case arrayArrayOfInteger = "array_array_of_integer" case arrayArrayOfModel = "array_array_of_model" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index d1b3b27616..ddb669a590 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -7,7 +7,9 @@ import Foundation -public struct Capitalization: Codable { + +public struct Capitalization: Codable { + public var smallCamel: String? public var capitalCamel: String? @@ -26,7 +28,7 @@ public struct Capitalization: Codable { self.ATT_NAME = ATT_NAME } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case smallCamel case capitalCamel = "CapitalCamel" case smallSnake = "small_Snake" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 7ab887f311..c4f6e0d488 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -7,7 +7,9 @@ import Foundation -public struct Cat: Codable { + +public struct Cat: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index a51ad0dffa..7b1d7e32be 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -7,7 +7,9 @@ import Foundation -public struct CatAllOf: Codable { + +public struct CatAllOf: Codable { + public var declawed: Bool? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index eb8f7e5e19..3ec00f5ab1 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,7 +7,9 @@ import Foundation -public struct Category: Codable { + +public struct Category: Codable { + public var id: Int64? public var name: String = "default-name" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index e2a7d4427a..af030c3dd6 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable { +public struct ClassModel: Codable { + public var _class: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 00245ca372..0aae748c76 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -7,7 +7,9 @@ import Foundation -public struct Client: Codable { + +public struct Client: Codable { + public var client: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 492c122800..198e28b94d 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -7,7 +7,9 @@ import Foundation -public struct Dog: Codable { + +public struct Dog: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 7786f8acc5..8ff49b2af2 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -7,7 +7,9 @@ import Foundation -public struct DogAllOf: Codable { + +public struct DogAllOf: Codable { + public var breed: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 9844e7c40e..e2d3fa04f9 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -7,7 +7,9 @@ import Foundation -public struct EnumArrays: Codable { + +public struct EnumArrays: Codable { + public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" @@ -25,7 +27,7 @@ public struct EnumArrays: Codable { self.arrayEnum = arrayEnum } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case justSymbol = "just_symbol" case arrayEnum = "array_enum" } diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift index d4029d73f8..c2c639ba32 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -7,6 +7,7 @@ import Foundation + public enum EnumClass: String, Codable, CaseIterable { case abc = "_abc" case efg = "-efg" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 789f583e1d..a56e1f3638 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct EnumTest: Codable { + +public struct EnumTest: Codable { + public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" @@ -41,7 +43,7 @@ public struct EnumTest: Codable { self.outerEnum = outerEnum } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case enumString = "enum_string" case enumStringRequired = "enum_string_required" case enumInteger = "enum_integer" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift index abf3ccffc4..773b53b2cb 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -8,7 +8,8 @@ import Foundation /** Must be named `File` for test. */ -public struct File: Codable { +public struct File: Codable { + /** Test capitalization */ public var sourceURI: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 532f145793..83dc1148cf 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -7,7 +7,9 @@ import Foundation -public struct FileSchemaTestClass: Codable { + +public struct FileSchemaTestClass: Codable { + public var file: File? public var files: [File]? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 20bd6d103b..bccd3f9fb1 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct FormatTest: Codable { + +public struct FormatTest: Codable { + public var integer: Int? public var int32: Int? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 906ddb06fb..566d71a35e 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct HasOnlyReadOnly: Codable { + +public struct HasOnlyReadOnly: Codable { + public var bar: String? public var foo: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift index fe13d302cc..80cecab242 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -7,7 +7,9 @@ import Foundation -public struct List: Codable { + +public struct List: Codable { + public var _123list: String? @@ -15,7 +17,7 @@ public struct List: Codable { self._123list = _123list } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _123list = "123-list" } diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 4b6037f378..f0c02de95f 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -7,25 +7,27 @@ import Foundation -public struct MapTest: Codable { + +public struct MapTest: Codable { + public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" case lower = "lower" } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? + 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?) { + 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, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case mapMapOfString = "map_map_of_string" case mapOfEnumString = "map_of_enum_string" case directMap = "direct_map" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c3deb2f289..710e62a9b5 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -7,13 +7,15 @@ import Foundation -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + public var uuid: UUID? public var dateTime: Date? - public var map: [String: Animal]? + public var map: [String:Animal]? - public init(uuid: UUID?, dateTime: Date?, 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/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index b61db7d6e7..450a53b918 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model name starting with number */ -public struct Model200Response: Codable { +public struct Model200Response: Codable { + public var name: Int? public var _class: String? @@ -18,7 +19,7 @@ public struct Model200Response: Codable { self._class = _class } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case name case _class = "class" } diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 8ab4db44b7..6deb69fcd7 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model name same as property name */ -public struct Name: Codable { +public struct Name: Codable { + public var name: Int public var snakeCase: Int? @@ -22,7 +23,7 @@ public struct Name: Codable { self._123number = _123number } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case name case snakeCase = "snake_case" case property diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 4d1dafcc2c..0c9ee2b7b9 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct NumberOnly: Codable { + +public struct NumberOnly: Codable { + public var justNumber: Double? @@ -15,7 +17,7 @@ public struct NumberOnly: Codable { self.justNumber = justNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case justNumber = "JustNumber" } diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index 40c30cc860..ab0eac0b30 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,7 +7,9 @@ import Foundation -public struct Order: Codable { + +public struct Order: Codable { + public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index 18c3a024f1..4a7d227104 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -7,7 +7,9 @@ import Foundation -public struct OuterComposite: Codable { + +public struct OuterComposite: Codable { + public var myNumber: Double? public var myString: String? @@ -19,7 +21,7 @@ public struct OuterComposite: Codable { self.myBoolean = myBoolean } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case myNumber = "my_number" case myString = "my_string" case myBoolean = "my_boolean" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift index c3b778cbbe..9e6b8d74e8 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -7,6 +7,7 @@ import Foundation + public enum OuterEnum: String, Codable, CaseIterable { case placed = "placed" case approved = "approved" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index b9ce0e9332..a973071d6c 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,7 +7,9 @@ import Foundation -public struct Pet: Codable { + +public struct Pet: Codable { + public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 0acd21fd10..b2a6b7e2b8 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -7,7 +7,9 @@ import Foundation -public struct ReadOnlyFirst: Codable { + +public struct ReadOnlyFirst: Codable { + public var bar: String? public var baz: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index c223f993a6..7e089dcee2 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing reserved words */ -public struct Return: Codable { +public struct Return: Codable { + public var _return: Int? @@ -16,7 +17,7 @@ public struct Return: Codable { self._return = _return } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _return = "return" } diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index 6e8650f76d..e890ef9525 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -7,7 +7,9 @@ import Foundation -public struct SpecialModelName: Codable { + +public struct SpecialModelName: Codable { + public var specialPropertyName: Int64? @@ -15,7 +17,7 @@ public struct SpecialModelName: Codable { self.specialPropertyName = specialPropertyName } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case specialPropertyName = "$special[property.name]" } diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 3f1237fee4..f65ae0623d 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -7,9 +7,12 @@ import Foundation -public struct StringBooleanMap: Codable { - public var additionalProperties: [String: Bool] = [:] +public struct StringBooleanMap: Codable { + + + + public var additionalProperties: [String:Bool] = [:] public subscript(key: String) -> Bool? { get { @@ -42,4 +45,5 @@ public struct StringBooleanMap: Codable { additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) } + } diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 4dd8a9a9f5..a91b6061bc 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,7 +7,9 @@ import Foundation -public struct Tag: Codable { + +public struct Tag: Codable { + public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index a9e088808e..2d377c3edb 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -7,7 +7,9 @@ import Foundation -public struct TypeHolderDefault: Codable { + +public struct TypeHolderDefault: Codable { + public var stringItem: String = "what" public var numberItem: Double @@ -23,7 +25,7 @@ public struct TypeHolderDefault: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index dff4083ae4..e5eb92da69 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -7,7 +7,9 @@ import Foundation -public struct TypeHolderExample: Codable { + +public struct TypeHolderExample: Codable { + public var stringItem: String public var numberItem: Double @@ -23,7 +25,7 @@ public struct TypeHolderExample: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 79f271ed73..f70328ca9e 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,7 +7,9 @@ import Foundation -public struct User: Codable { + +public struct User: Codable { + public var id: Int64? public var username: String? diff --git a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 55d0eb4219..22261e2ce9 100644 --- a/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/combineLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -14,7 +14,7 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { return URLSessionRequestBuilder.self } - func getBuilder() -> RequestBuilder.Type { + func getBuilder() -> RequestBuilder.Type { return URLSessionDecodableRequestBuilder.self } } @@ -23,16 +23,16 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { private var urlSessionStore = SynchronizedDictionary() open class URLSessionRequestBuilder: RequestBuilder { - + private var observation: NSKeyValueObservation? - + deinit { observation?.invalidate() } - + // swiftlint:disable:next weak_delegate fileprivate let sessionDelegate = SessionDelegate() - + /** May be assigned if you want to control the authentication challenges. */ @@ -45,11 +45,11 @@ open class URLSessionRequestBuilder: RequestBuilder { - retry the request. */ public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + + 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 URLSession configuration. @@ -77,40 +77,40 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { - + open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) throws -> URLRequest { + guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL } - + var originalRequest = URLRequest(url: url) - + originalRequest.httpMethod = method.rawValue - + buildHeaders().forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + headers.forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) - + return modifiedRequest } override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { - let urlSessionId: String = UUID().uuidString + let urlSessionId:String = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() urlSessionStore[urlSessionId] = urlSession - + let parameters: [String: Any] = self.parameters ?? [:] - + let fileKeys = parameters.filter { $1 is URL } .map { $0.0 } - + let encoding: ParameterEncoding if fileKeys.count > 0 { encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) @@ -119,29 +119,29 @@ open class URLSessionRequestBuilder: RequestBuilder { } else { encoding = URLEncoding() } - + guard let xMethod = HTTPMethod(rawValue: method) else { fatalError("Unsuported Http method - \(method)") } - + let cleanupRequest = { urlSessionStore[urlSessionId] = nil self.observation?.invalidate() } - + do { let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) - + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in - + guard let self = self else { return } - + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { - + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in - + guard let self = self else { return } - + if shouldRetry { cleanupRequest() self.execute(apiResponseQueue, completion) @@ -157,13 +157,13 @@ open class URLSessionRequestBuilder: RequestBuilder { } } } - + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { onProgressReady?(dataTask.progress) } - + dataTask.resume() - + } catch { apiResponseQueue.async { cleanupRequest() @@ -172,7 +172,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -192,52 +192,52 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is URL.Type: do { - + guard error == nil else { throw DownloadException.responseFailed } - + guard let data = data else { throw DownloadException.responseDataMissing } - + let fileManager = FileManager.default 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: httpResponse.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(.success(Response(response: httpResponse, body: filePath as? T))) - + } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, requestParserError))) } catch let error { completion(.failure(ErrorResponse.error(400, data, error))) } - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + default: - + completion(.success(Response(response: httpResponse, body: data as? T))) } @@ -251,7 +251,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return httpHeaders } - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { guard let contentDisposition = contentDisposition else { return nil @@ -270,7 +270,7 @@ open class URLSessionRequestBuilder: RequestBuilder { filename = contentItem return filename? - .replacingCharacters(in: range, with: "") + .replacingCharacters(in: range, with:"") .replacingOccurrences(of: "\"", with: "") .trimmingCharacters(in: .whitespacesAndNewlines) } @@ -279,7 +279,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getPath(from url: URL) throws -> String { + fileprivate func getPath(from url : URL) throws -> String { guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { throw DownloadException.requestMissingPath @@ -293,7 +293,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { guard let url = urlRequest.url else { throw DownloadException.requestMissingURL @@ -304,7 +304,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } -open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { +open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -324,28 +324,28 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + case is Data.Type: - + completion(.success(Response(response: httpResponse, body: data as? T))) - + default: - + guard let data = data, !data.isEmpty else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) return } - + let decodeResult = CodableHelper.decode(T.self, from: data) - + switch decodeResult { case let .success(decodableObj): completion(.success(Response(response: httpResponse, body: decodableObj))) @@ -356,10 +356,10 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui } } -private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { - +fileprivate class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + var credential: URLCredential? - + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { @@ -402,13 +402,13 @@ public protocol ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest } -private class URLEncoding: ParameterEncoding { - func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { - +fileprivate class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String : Any]?) throws -> URLRequest { + var urlRequest = urlRequest - + guard let parameters = parameters else { return urlRequest } - + guard let url = urlRequest.url else { throw DownloadException.requestMissingURL } @@ -417,12 +417,12 @@ private class URLEncoding: ParameterEncoding { urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) urlRequest.url = urlComponents.url } - + return urlRequest } } -private class FileUploadEncoding: ParameterEncoding { +fileprivate class FileUploadEncoding: ParameterEncoding { let contentTypeForFormPart: (_ fileURL: URL) -> String? @@ -433,13 +433,13 @@ private class FileUploadEncoding: ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { var urlRequest = urlRequest - + guard let parameters = parameters, !parameters.isEmpty else { return urlRequest } - + let boundary = "Boundary-\(UUID().uuidString)" - + urlRequest.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") for (key, value) in parameters { @@ -479,7 +479,7 @@ private class FileUploadEncoding: ParameterEncoding { fatalError("Unprocessable value \(value) with key \(key)") } } - + var body = urlRequest.httpBody.orEmpty body.append("\r\n--\(boundary)--\r\n") @@ -494,7 +494,7 @@ private class FileUploadEncoding: ParameterEncoding { var urlRequest = urlRequest var body = urlRequest.httpBody.orEmpty - + let fileData = try Data(contentsOf: fileURL) let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) @@ -502,7 +502,7 @@ private class FileUploadEncoding: ParameterEncoding { let fileName = fileURL.lastPathComponent // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } @@ -518,20 +518,20 @@ private class FileUploadEncoding: ParameterEncoding { // The value data. body.append(fileData) - + urlRequest.httpBody = body return urlRequest } - + private func configureDataUploadRequest(urlRequest: URLRequest, boundary: String, name: String, data: Data) -> URLRequest { var urlRequest = urlRequest - + var body = urlRequest.httpBody.orEmpty // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } diff --git a/samples/client/petstore/swift5/default/Package.swift b/samples/client/petstore/swift5/default/Package.swift index 96dfff54ed..79f6f81887 100644 --- a/samples/client/petstore/swift5/default/Package.swift +++ b/samples/client/petstore/swift5/default/Package.swift @@ -14,7 +14,7 @@ let package = Package( // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "PetstoreClient", - targets: ["PetstoreClient"]) + targets: ["PetstoreClient"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. @@ -26,6 +26,6 @@ let package = Package( name: "PetstoreClient", dependencies: [], path: "PetstoreClient/Classes" - ) + ), ] ) diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 5b09f95571..2404bc8ffc 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -7,7 +7,7 @@ import Foundation public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + 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 @@ -20,17 +20,17 @@ public struct APIHelper { return destination } - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + 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: ",") + if let collection = item.value as? Array { + 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]? { + public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { guard let source = source else { return nil } @@ -46,15 +46,15 @@ public struct APIHelper { } public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { + if let collection = source as? Array { return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") } return source } - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + 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?] { + if let collection = item.value as? Array { collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } @@ -69,3 +69,4 @@ public struct APIHelper { return destination } } + diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift index a5c2d605df..c5d1b9b42d 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,15 +9,15 @@ 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 customHeaders: [String:String] = [:] public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() public static var apiResponseQueue: DispatchQueue = .main } open class RequestBuilder { var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? + var headers: [String:String] + public let parameters: [String:Any]? public let isBody: Bool public let method: String public let URLString: String @@ -25,9 +25,9 @@ open class RequestBuilder { /// Optional block to obtain a reference to the request's progress instance when available. /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. /// If you need to get the request's progress in older OS versions, please use Alamofire http client. - public var onProgressReady: ((Progress) -> Void)? + public var onProgressReady: ((Progress) -> ())? - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters @@ -37,7 +37,7 @@ open class RequestBuilder { addHeaders(PetstoreClientAPI.customHeaders) } - open func addHeaders(_ aHeaders: [String: String]) { + open func addHeaders(_ aHeaders:[String:String]) { for (header, value) in aHeaders { headers[header] = value } @@ -60,5 +60,5 @@ open class RequestBuilder { public protocol RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type } diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 5bbf323f82..bb3ae71782 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class AnotherFakeAPI { /** To test special tags @@ -15,7 +17,7 @@ open class AnotherFakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 134d6aea41..d1d81faa33 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class FakeAPI { /** @@ -14,7 +16,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { + open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?,_ error: Error?) -> Void)) { fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -49,7 +51,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?,_ error: Error?) -> Void)) { fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -84,7 +86,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { + open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?,_ error: Error?) -> Void)) { fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -119,7 +121,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -154,7 +156,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -190,7 +192,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -229,7 +231,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -279,7 +281,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, 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(apiResponseQueue) { result -> Void in switch result { case .success: @@ -316,7 +318,7 @@ open class FakeAPI { 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?] = [ + let formParams: [String:Any?] = [ "integer": integer?.encodeToJSON(), "int32": int32?.encodeToJSON(), "int64": int64?.encodeToJSON(), @@ -335,7 +337,7 @@ open class FakeAPI { let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -424,7 +426,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, 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(apiResponseQueue) { result -> Void in switch result { case .success: @@ -452,19 +454,19 @@ open class FakeAPI { 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?] = [ + 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_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), "enum_query_double": enumQueryDouble?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -490,7 +492,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -516,13 +518,13 @@ open class FakeAPI { 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 - + 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(), + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), "int64_group": int64Group?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -543,7 +545,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testInlineAdditionalProperties(param: [String:String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -560,7 +562,7 @@ open class FakeAPI { - parameter param: (body) request body - returns: RequestBuilder */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> 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) @@ -580,7 +582,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -601,14 +603,14 @@ open class FakeAPI { open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { let path = "/fake/jsonFormData" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + 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() diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index 48cfe7187b..d21c4a49d4 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -7,6 +7,8 @@ import Foundation + + open class FakeClassnameTags123API { /** To test class name in snake case @@ -15,7 +17,7 @@ open class FakeClassnameTags123API { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index c938db7200..f5366f5832 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class PetAPI { /** Add a new pet to the store @@ -15,7 +17,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -55,7 +57,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -82,8 +84,8 @@ open class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let nillableHeaders: [String: Any?] = [ "api_key": apiKey?.encodeToJSON() @@ -111,7 +113,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -135,8 +137,8 @@ open class PetAPI { open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "status": status.encodeToJSON() @@ -155,7 +157,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ @available(*, deprecated, message: "This operation is deprecated.") - open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -180,8 +182,8 @@ open class PetAPI { open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tags": tags.encodeToJSON() @@ -199,7 +201,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { + open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?,_ error: Error?) -> Void)) { getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -226,8 +228,8 @@ open class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -242,7 +244,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -283,7 +285,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -311,14 +313,14 @@ open class PetAPI { 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?] = [ + 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() @@ -335,7 +337,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -363,14 +365,14 @@ open class PetAPI { 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?] = [ + 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() @@ -387,7 +389,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -415,14 +417,14 @@ open class PetAPI { 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?] = [ + 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() diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index a8a83eda39..3848eda85a 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class StoreAPI { /** Delete purchase order by ID @@ -15,7 +17,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -39,8 +41,8 @@ open class StoreAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -54,7 +56,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String:Int]?,_ error: Error?) -> Void)) { getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -74,14 +76,14 @@ open class StoreAPI { - name: api_key - returns: RequestBuilder<[String:Int]> */ - open class func getInventoryWithRequestBuilder() -> 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + let requestBuilder: RequestBuilder<[String:Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } @@ -93,7 +95,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -117,8 +119,8 @@ open class StoreAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -133,7 +135,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index 505ed1b0c5..546166841d 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class UserAPI { /** Create user @@ -15,7 +17,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -52,7 +54,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -88,7 +90,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -124,7 +126,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -148,8 +150,8 @@ open class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -164,7 +166,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { + open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?,_ error: Error?) -> Void)) { getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -187,8 +189,8 @@ open class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -204,7 +206,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -226,11 +228,11 @@ open class UserAPI { open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), + "username": username.encodeToJSON(), "password": password.encodeToJSON() ]) @@ -245,7 +247,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -264,8 +266,8 @@ open class UserAPI { open class func logoutUserWithRequestBuilder() -> RequestBuilder { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -281,7 +283,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift index ef971ebadc..01b28a4bd4 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -45,4 +45,4 @@ open class CodableHelper { open class func encode(_ value: T) -> Swift.Result where T: Encodable { return Swift.Result { try self.jsonEncoder.encode(value) } } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Configuration.swift index 627d9adb75..f171525e43 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -7,10 +7,10 @@ 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. @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} + +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 93ed6b90b3..6e279679c6 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -108,24 +108,24 @@ extension String: CodingKey { extension KeyedEncodingContainerProtocol { - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + 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 { + 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 { + 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 { + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { if let pairs = pairs { try encodeMap(pairs) } @@ -135,7 +135,7 @@ extension KeyedEncodingContainerProtocol { extension KeyedDecodingContainerProtocol { - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { var tmpArray = [T]() var nestedContainer = try nestedUnkeyedContainer(forKey: key) @@ -147,8 +147,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil if contains(key) { tmpArray = try decodeArray(T.self, forKey: key) @@ -157,8 +157,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] + 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) { @@ -177,3 +177,5 @@ extension HTTPURLResponse { return Array(200 ..< 300).contains(statusCode) } } + + diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64..08f1ef334d 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -41,7 +41,7 @@ public struct JSONDataEncoding { } public static func encodingParameters(jsonData: Data?) -> [String: Any]? { - var returnedParams: [String: Any]? + var returnedParams: [String: Any]? = nil if let jsonData = jsonData, !jsonData.isEmpty { var params: [String: Any] = [:] params[jsonDataKey] = jsonData diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 02f78ffb47..314f1eff1f 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -9,8 +9,8 @@ import Foundation open class JSONEncodingHelper { - open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { - var params: [String: Any]? + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? = nil // Encode the Encodable object if let encodableObj = encodableObj { @@ -27,7 +27,7 @@ open class JSONEncodingHelper { } open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { - var params: [String: Any]? + var params: [String: Any]? = nil if let encodableObj = encodableObj { do { @@ -41,5 +41,5 @@ open class JSONEncodingHelper { return params } - + } diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift index c0542c14c0..11e81ffcc4 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,11 +10,11 @@ protocol JSONEncodable { func encodeToJSON() -> Any } -public enum ErrorResponse: Error { +public enum ErrorResponse : Error { case error(Int, Data?, Error) } -public enum DownloadException: Error { +public enum DownloadException : Error { case responseDataMissing case responseFailed case requestMissing @@ -30,6 +30,7 @@ public enum DecodableRequestBuilderError: Error { case generalError(Error) } + open class Response { public let statusCode: Int public let header: [String: String] @@ -43,7 +44,7 @@ open class Response { public convenience init(response: HTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String: String]() + var header = [String:String]() for (key, value) in rawHeader { if let key = key.base as? String, let value = value as? String { header[key] = value diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 1af0315359..28ca8377b8 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -7,17 +7,19 @@ import Foundation -public struct AdditionalPropertiesClass: Codable { - public var mapString: [String: String]? - public var mapMapString: [String: [String: String]]? +public struct AdditionalPropertiesClass: Codable { - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + + 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, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case mapString = "map_string" case mapMapString = "map_map_string" } diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index 5ed9f31e2a..1050d79dbe 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -7,7 +7,9 @@ import Foundation -public struct Animal: Codable { + +public struct Animal: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift index e09b0e9efd..e7bea63f8e 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -7,4 +7,5 @@ import Foundation + public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index ec270da890..4d0393b9ba 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -7,7 +7,9 @@ import Foundation -public struct ApiResponse: Codable { + +public struct ApiResponse: Codable { + public var code: Int? public var type: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 6c252ed475..1363c96394 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayOfArrayOfNumberOnly: Codable { + +public struct ArrayOfArrayOfNumberOnly: Codable { + public var arrayArrayNumber: [[Double]]? @@ -15,7 +17,7 @@ public struct ArrayOfArrayOfNumberOnly: Codable { self.arrayArrayNumber = arrayArrayNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayArrayNumber = "ArrayArrayNumber" } diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index e84eb5d650..6b8873730c 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayOfNumberOnly: Codable { + +public struct ArrayOfNumberOnly: Codable { + public var arrayNumber: [Double]? @@ -15,7 +17,7 @@ public struct ArrayOfNumberOnly: Codable { self.arrayNumber = arrayNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayNumber = "ArrayNumber" } diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index d2140933d1..64f7c6d9db 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayTest: Codable { + +public struct ArrayTest: Codable { + public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? @@ -19,7 +21,7 @@ public struct ArrayTest: Codable { self.arrayArrayOfModel = arrayArrayOfModel } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayOfString = "array_of_string" case arrayArrayOfInteger = "array_array_of_integer" case arrayArrayOfModel = "array_array_of_model" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index d1b3b27616..ddb669a590 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -7,7 +7,9 @@ import Foundation -public struct Capitalization: Codable { + +public struct Capitalization: Codable { + public var smallCamel: String? public var capitalCamel: String? @@ -26,7 +28,7 @@ public struct Capitalization: Codable { self.ATT_NAME = ATT_NAME } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case smallCamel case capitalCamel = "CapitalCamel" case smallSnake = "small_Snake" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 7ab887f311..c4f6e0d488 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -7,7 +7,9 @@ import Foundation -public struct Cat: Codable { + +public struct Cat: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index a51ad0dffa..7b1d7e32be 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -7,7 +7,9 @@ import Foundation -public struct CatAllOf: Codable { + +public struct CatAllOf: Codable { + public var declawed: Bool? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index eb8f7e5e19..3ec00f5ab1 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,7 +7,9 @@ import Foundation -public struct Category: Codable { + +public struct Category: Codable { + public var id: Int64? public var name: String = "default-name" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index e2a7d4427a..af030c3dd6 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable { +public struct ClassModel: Codable { + public var _class: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 00245ca372..0aae748c76 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -7,7 +7,9 @@ import Foundation -public struct Client: Codable { + +public struct Client: Codable { + public var client: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 492c122800..198e28b94d 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -7,7 +7,9 @@ import Foundation -public struct Dog: Codable { + +public struct Dog: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 7786f8acc5..8ff49b2af2 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -7,7 +7,9 @@ import Foundation -public struct DogAllOf: Codable { + +public struct DogAllOf: Codable { + public var breed: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 9844e7c40e..e2d3fa04f9 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -7,7 +7,9 @@ import Foundation -public struct EnumArrays: Codable { + +public struct EnumArrays: Codable { + public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" @@ -25,7 +27,7 @@ public struct EnumArrays: Codable { self.arrayEnum = arrayEnum } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case justSymbol = "just_symbol" case arrayEnum = "array_enum" } diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift index d4029d73f8..c2c639ba32 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -7,6 +7,7 @@ import Foundation + public enum EnumClass: String, Codable, CaseIterable { case abc = "_abc" case efg = "-efg" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 789f583e1d..a56e1f3638 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct EnumTest: Codable { + +public struct EnumTest: Codable { + public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" @@ -41,7 +43,7 @@ public struct EnumTest: Codable { self.outerEnum = outerEnum } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case enumString = "enum_string" case enumStringRequired = "enum_string_required" case enumInteger = "enum_integer" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift index abf3ccffc4..773b53b2cb 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -8,7 +8,8 @@ import Foundation /** Must be named `File` for test. */ -public struct File: Codable { +public struct File: Codable { + /** Test capitalization */ public var sourceURI: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 532f145793..83dc1148cf 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -7,7 +7,9 @@ import Foundation -public struct FileSchemaTestClass: Codable { + +public struct FileSchemaTestClass: Codable { + public var file: File? public var files: [File]? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 20bd6d103b..bccd3f9fb1 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct FormatTest: Codable { + +public struct FormatTest: Codable { + public var integer: Int? public var int32: Int? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 906ddb06fb..566d71a35e 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct HasOnlyReadOnly: Codable { + +public struct HasOnlyReadOnly: Codable { + public var bar: String? public var foo: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift index fe13d302cc..80cecab242 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -7,7 +7,9 @@ import Foundation -public struct List: Codable { + +public struct List: Codable { + public var _123list: String? @@ -15,7 +17,7 @@ public struct List: Codable { self._123list = _123list } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _123list = "123-list" } diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 4b6037f378..f0c02de95f 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -7,25 +7,27 @@ import Foundation -public struct MapTest: Codable { + +public struct MapTest: Codable { + public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" case lower = "lower" } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? + 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?) { + 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, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case mapMapOfString = "map_map_of_string" case mapOfEnumString = "map_of_enum_string" case directMap = "direct_map" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c3deb2f289..710e62a9b5 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -7,13 +7,15 @@ import Foundation -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + public var uuid: UUID? public var dateTime: Date? - public var map: [String: Animal]? + public var map: [String:Animal]? - public init(uuid: UUID?, dateTime: Date?, 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/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index b61db7d6e7..450a53b918 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model name starting with number */ -public struct Model200Response: Codable { +public struct Model200Response: Codable { + public var name: Int? public var _class: String? @@ -18,7 +19,7 @@ public struct Model200Response: Codable { self._class = _class } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case name case _class = "class" } diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 8ab4db44b7..6deb69fcd7 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model name same as property name */ -public struct Name: Codable { +public struct Name: Codable { + public var name: Int public var snakeCase: Int? @@ -22,7 +23,7 @@ public struct Name: Codable { self._123number = _123number } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case name case snakeCase = "snake_case" case property diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 4d1dafcc2c..0c9ee2b7b9 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct NumberOnly: Codable { + +public struct NumberOnly: Codable { + public var justNumber: Double? @@ -15,7 +17,7 @@ public struct NumberOnly: Codable { self.justNumber = justNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case justNumber = "JustNumber" } diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index 40c30cc860..ab0eac0b30 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,7 +7,9 @@ import Foundation -public struct Order: Codable { + +public struct Order: Codable { + public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index 18c3a024f1..4a7d227104 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -7,7 +7,9 @@ import Foundation -public struct OuterComposite: Codable { + +public struct OuterComposite: Codable { + public var myNumber: Double? public var myString: String? @@ -19,7 +21,7 @@ public struct OuterComposite: Codable { self.myBoolean = myBoolean } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case myNumber = "my_number" case myString = "my_string" case myBoolean = "my_boolean" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift index c3b778cbbe..9e6b8d74e8 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -7,6 +7,7 @@ import Foundation + public enum OuterEnum: String, Codable, CaseIterable { case placed = "placed" case approved = "approved" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index b9ce0e9332..a973071d6c 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,7 +7,9 @@ import Foundation -public struct Pet: Codable { + +public struct Pet: Codable { + public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 0acd21fd10..b2a6b7e2b8 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -7,7 +7,9 @@ import Foundation -public struct ReadOnlyFirst: Codable { + +public struct ReadOnlyFirst: Codable { + public var bar: String? public var baz: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index c223f993a6..7e089dcee2 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing reserved words */ -public struct Return: Codable { +public struct Return: Codable { + public var _return: Int? @@ -16,7 +17,7 @@ public struct Return: Codable { self._return = _return } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _return = "return" } diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index 6e8650f76d..e890ef9525 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -7,7 +7,9 @@ import Foundation -public struct SpecialModelName: Codable { + +public struct SpecialModelName: Codable { + public var specialPropertyName: Int64? @@ -15,7 +17,7 @@ public struct SpecialModelName: Codable { self.specialPropertyName = specialPropertyName } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case specialPropertyName = "$special[property.name]" } diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 3f1237fee4..f65ae0623d 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -7,9 +7,12 @@ import Foundation -public struct StringBooleanMap: Codable { - public var additionalProperties: [String: Bool] = [:] +public struct StringBooleanMap: Codable { + + + + public var additionalProperties: [String:Bool] = [:] public subscript(key: String) -> Bool? { get { @@ -42,4 +45,5 @@ public struct StringBooleanMap: Codable { additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) } + } diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 4dd8a9a9f5..a91b6061bc 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,7 +7,9 @@ import Foundation -public struct Tag: Codable { + +public struct Tag: Codable { + public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index a9e088808e..2d377c3edb 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -7,7 +7,9 @@ import Foundation -public struct TypeHolderDefault: Codable { + +public struct TypeHolderDefault: Codable { + public var stringItem: String = "what" public var numberItem: Double @@ -23,7 +25,7 @@ public struct TypeHolderDefault: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index dff4083ae4..e5eb92da69 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -7,7 +7,9 @@ import Foundation -public struct TypeHolderExample: Codable { + +public struct TypeHolderExample: Codable { + public var stringItem: String public var numberItem: Double @@ -23,7 +25,7 @@ public struct TypeHolderExample: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 79f271ed73..f70328ca9e 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,7 +7,9 @@ import Foundation -public struct User: Codable { + +public struct User: Codable { + public var id: Int64? public var username: String? diff --git a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 55d0eb4219..22261e2ce9 100644 --- a/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/default/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -14,7 +14,7 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { return URLSessionRequestBuilder.self } - func getBuilder() -> RequestBuilder.Type { + func getBuilder() -> RequestBuilder.Type { return URLSessionDecodableRequestBuilder.self } } @@ -23,16 +23,16 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { private var urlSessionStore = SynchronizedDictionary() open class URLSessionRequestBuilder: RequestBuilder { - + private var observation: NSKeyValueObservation? - + deinit { observation?.invalidate() } - + // swiftlint:disable:next weak_delegate fileprivate let sessionDelegate = SessionDelegate() - + /** May be assigned if you want to control the authentication challenges. */ @@ -45,11 +45,11 @@ open class URLSessionRequestBuilder: RequestBuilder { - retry the request. */ public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + + 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 URLSession configuration. @@ -77,40 +77,40 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { - + open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) throws -> URLRequest { + guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL } - + var originalRequest = URLRequest(url: url) - + originalRequest.httpMethod = method.rawValue - + buildHeaders().forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + headers.forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) - + return modifiedRequest } override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { - let urlSessionId: String = UUID().uuidString + let urlSessionId:String = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() urlSessionStore[urlSessionId] = urlSession - + let parameters: [String: Any] = self.parameters ?? [:] - + let fileKeys = parameters.filter { $1 is URL } .map { $0.0 } - + let encoding: ParameterEncoding if fileKeys.count > 0 { encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) @@ -119,29 +119,29 @@ open class URLSessionRequestBuilder: RequestBuilder { } else { encoding = URLEncoding() } - + guard let xMethod = HTTPMethod(rawValue: method) else { fatalError("Unsuported Http method - \(method)") } - + let cleanupRequest = { urlSessionStore[urlSessionId] = nil self.observation?.invalidate() } - + do { let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) - + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in - + guard let self = self else { return } - + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { - + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in - + guard let self = self else { return } - + if shouldRetry { cleanupRequest() self.execute(apiResponseQueue, completion) @@ -157,13 +157,13 @@ open class URLSessionRequestBuilder: RequestBuilder { } } } - + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { onProgressReady?(dataTask.progress) } - + dataTask.resume() - + } catch { apiResponseQueue.async { cleanupRequest() @@ -172,7 +172,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -192,52 +192,52 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is URL.Type: do { - + guard error == nil else { throw DownloadException.responseFailed } - + guard let data = data else { throw DownloadException.responseDataMissing } - + let fileManager = FileManager.default 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: httpResponse.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(.success(Response(response: httpResponse, body: filePath as? T))) - + } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, requestParserError))) } catch let error { completion(.failure(ErrorResponse.error(400, data, error))) } - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + default: - + completion(.success(Response(response: httpResponse, body: data as? T))) } @@ -251,7 +251,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return httpHeaders } - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { guard let contentDisposition = contentDisposition else { return nil @@ -270,7 +270,7 @@ open class URLSessionRequestBuilder: RequestBuilder { filename = contentItem return filename? - .replacingCharacters(in: range, with: "") + .replacingCharacters(in: range, with:"") .replacingOccurrences(of: "\"", with: "") .trimmingCharacters(in: .whitespacesAndNewlines) } @@ -279,7 +279,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getPath(from url: URL) throws -> String { + fileprivate func getPath(from url : URL) throws -> String { guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { throw DownloadException.requestMissingPath @@ -293,7 +293,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { guard let url = urlRequest.url else { throw DownloadException.requestMissingURL @@ -304,7 +304,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } -open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { +open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -324,28 +324,28 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + case is Data.Type: - + completion(.success(Response(response: httpResponse, body: data as? T))) - + default: - + guard let data = data, !data.isEmpty else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) return } - + let decodeResult = CodableHelper.decode(T.self, from: data) - + switch decodeResult { case let .success(decodableObj): completion(.success(Response(response: httpResponse, body: decodableObj))) @@ -356,10 +356,10 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui } } -private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { - +fileprivate class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + var credential: URLCredential? - + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { @@ -402,13 +402,13 @@ public protocol ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest } -private class URLEncoding: ParameterEncoding { - func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { - +fileprivate class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String : Any]?) throws -> URLRequest { + var urlRequest = urlRequest - + guard let parameters = parameters else { return urlRequest } - + guard let url = urlRequest.url else { throw DownloadException.requestMissingURL } @@ -417,12 +417,12 @@ private class URLEncoding: ParameterEncoding { urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) urlRequest.url = urlComponents.url } - + return urlRequest } } -private class FileUploadEncoding: ParameterEncoding { +fileprivate class FileUploadEncoding: ParameterEncoding { let contentTypeForFormPart: (_ fileURL: URL) -> String? @@ -433,13 +433,13 @@ private class FileUploadEncoding: ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { var urlRequest = urlRequest - + guard let parameters = parameters, !parameters.isEmpty else { return urlRequest } - + let boundary = "Boundary-\(UUID().uuidString)" - + urlRequest.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") for (key, value) in parameters { @@ -479,7 +479,7 @@ private class FileUploadEncoding: ParameterEncoding { fatalError("Unprocessable value \(value) with key \(key)") } } - + var body = urlRequest.httpBody.orEmpty body.append("\r\n--\(boundary)--\r\n") @@ -494,7 +494,7 @@ private class FileUploadEncoding: ParameterEncoding { var urlRequest = urlRequest var body = urlRequest.httpBody.orEmpty - + let fileData = try Data(contentsOf: fileURL) let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) @@ -502,7 +502,7 @@ private class FileUploadEncoding: ParameterEncoding { let fileName = fileURL.lastPathComponent // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } @@ -518,20 +518,20 @@ private class FileUploadEncoding: ParameterEncoding { // The value data. body.append(fileData) - + urlRequest.httpBody = body return urlRequest } - + private func configureDataUploadRequest(urlRequest: URLRequest, boundary: String, name: String, data: Data) -> URLRequest { var urlRequest = urlRequest - + var body = urlRequest.httpBody.orEmpty // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } diff --git a/samples/client/petstore/swift5/deprecated/Package.swift b/samples/client/petstore/swift5/deprecated/Package.swift index 96dfff54ed..79f6f81887 100644 --- a/samples/client/petstore/swift5/deprecated/Package.swift +++ b/samples/client/petstore/swift5/deprecated/Package.swift @@ -14,7 +14,7 @@ let package = Package( // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "PetstoreClient", - targets: ["PetstoreClient"]) + targets: ["PetstoreClient"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. @@ -26,6 +26,6 @@ let package = Package( name: "PetstoreClient", dependencies: [], path: "PetstoreClient/Classes" - ) + ), ] ) diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 5b09f95571..2404bc8ffc 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -7,7 +7,7 @@ import Foundation public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + 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 @@ -20,17 +20,17 @@ public struct APIHelper { return destination } - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + 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: ",") + if let collection = item.value as? Array { + 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]? { + public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { guard let source = source else { return nil } @@ -46,15 +46,15 @@ public struct APIHelper { } public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { + if let collection = source as? Array { return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") } return source } - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + 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?] { + if let collection = item.value as? Array { collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } @@ -69,3 +69,4 @@ public struct APIHelper { return destination } } + diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs.swift index 74babd69f9..92d547e0d6 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,15 +9,15 @@ import Foundation open class PetstoreClientAPI { public static var basePath = "http://petstore.swagger.io/v2" public static var credential: URLCredential? - public static var customHeaders: [String: String] = [:] + public static var customHeaders: [String:String] = [:] public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() public static var apiResponseQueue: DispatchQueue = .main } open class RequestBuilder { var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? + var headers: [String:String] + public let parameters: [String:Any]? public let isBody: Bool public let method: String public let URLString: String @@ -25,9 +25,9 @@ open class RequestBuilder { /// Optional block to obtain a reference to the request's progress instance when available. /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. /// If you need to get the request's progress in older OS versions, please use Alamofire http client. - public var onProgressReady: ((Progress) -> Void)? + public var onProgressReady: ((Progress) -> ())? - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters @@ -37,7 +37,7 @@ open class RequestBuilder { addHeaders(PetstoreClientAPI.customHeaders) } - open func addHeaders(_ aHeaders: [String: String]) { + open func addHeaders(_ aHeaders:[String:String]) { for (header, value) in aHeaders { headers[header] = value } @@ -60,5 +60,5 @@ open class RequestBuilder { public protocol RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type } diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 06a266aab4..dbbbd66db2 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class PetAPI { /** Add a new pet to the store @@ -15,7 +17,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func addPet(pet: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func addPet(pet: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { addPetWithRequestBuilder(pet: pet).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -55,7 +57,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -82,8 +84,8 @@ open class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let nillableHeaders: [String: Any?] = [ "api_key": apiKey?.encodeToJSON() @@ -111,7 +113,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -135,8 +137,8 @@ open class PetAPI { open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "status": status.encodeToJSON() @@ -155,7 +157,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ @available(*, deprecated, message: "This operation is deprecated.") - open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -180,8 +182,8 @@ open class PetAPI { open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tags": tags.encodeToJSON() @@ -199,7 +201,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { + open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?,_ error: Error?) -> Void)) { getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -226,8 +228,8 @@ open class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -242,7 +244,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePet(pet: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func updatePet(pet: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updatePetWithRequestBuilder(pet: pet).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -283,7 +285,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -311,14 +313,14 @@ open class PetAPI { 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?] = [ + 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() @@ -335,7 +337,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -363,14 +365,14 @@ open class PetAPI { 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?] = [ + 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() diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index ff11001595..16fb9c207a 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class StoreAPI { /** Delete purchase order by ID @@ -15,7 +17,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -39,8 +41,8 @@ open class StoreAPI { let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{orderId}", with: orderIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -54,7 +56,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String:Int]?,_ error: Error?) -> Void)) { getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -74,14 +76,14 @@ open class StoreAPI { - name: api_key - returns: RequestBuilder<[String:Int]> */ - open class func getInventoryWithRequestBuilder() -> 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + let requestBuilder: RequestBuilder<[String:Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } @@ -93,7 +95,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -117,8 +119,8 @@ open class StoreAPI { let orderIdPostEscape = orderIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? "" path = path.replacingOccurrences(of: "{orderId}", with: orderIdPostEscape, options: .literal, range: nil) let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -133,7 +135,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func placeOrder(order: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func placeOrder(order: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { placeOrderWithRequestBuilder(order: order).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index 04a9b99643..8220640259 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class UserAPI { /** Create user @@ -15,7 +17,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func createUser(user: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func createUser(user: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUserWithRequestBuilder(user: user).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -55,7 +57,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithArrayInput(user: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func createUsersWithArrayInput(user: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUsersWithArrayInputWithRequestBuilder(user: user).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -94,7 +96,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithListInput(user: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func createUsersWithListInput(user: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUsersWithListInputWithRequestBuilder(user: user).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -133,7 +135,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -160,8 +162,8 @@ open class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -176,7 +178,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { + open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?,_ error: Error?) -> Void)) { getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -199,8 +201,8 @@ open class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -216,7 +218,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -238,11 +240,11 @@ open class UserAPI { open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), + "username": username.encodeToJSON(), "password": password.encodeToJSON() ]) @@ -257,7 +259,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -279,8 +281,8 @@ open class UserAPI { open class func logoutUserWithRequestBuilder() -> RequestBuilder { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -296,7 +298,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func updateUser(username: String, user: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func updateUser(username: String, user: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updateUserWithRequestBuilder(username: username, user: user).execute(apiResponseQueue) { result -> Void in switch result { case .success: diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift index ef971ebadc..01b28a4bd4 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -45,4 +45,4 @@ open class CodableHelper { open class func encode(_ value: T) -> Swift.Result where T: Encodable { return Swift.Result { try self.jsonEncoder.encode(value) } } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Configuration.swift index 627d9adb75..f171525e43 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -7,10 +7,10 @@ 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. @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} + +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 93ed6b90b3..6e279679c6 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -108,24 +108,24 @@ extension String: CodingKey { extension KeyedEncodingContainerProtocol { - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + 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 { + 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 { + 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 { + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { if let pairs = pairs { try encodeMap(pairs) } @@ -135,7 +135,7 @@ extension KeyedEncodingContainerProtocol { extension KeyedDecodingContainerProtocol { - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { var tmpArray = [T]() var nestedContainer = try nestedUnkeyedContainer(forKey: key) @@ -147,8 +147,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil if contains(key) { tmpArray = try decodeArray(T.self, forKey: key) @@ -157,8 +157,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] + 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) { @@ -177,3 +177,5 @@ extension HTTPURLResponse { return Array(200 ..< 300).contains(statusCode) } } + + diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64..08f1ef334d 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -41,7 +41,7 @@ public struct JSONDataEncoding { } public static func encodingParameters(jsonData: Data?) -> [String: Any]? { - var returnedParams: [String: Any]? + var returnedParams: [String: Any]? = nil if let jsonData = jsonData, !jsonData.isEmpty { var params: [String: Any] = [:] params[jsonDataKey] = jsonData diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 02f78ffb47..314f1eff1f 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -9,8 +9,8 @@ import Foundation open class JSONEncodingHelper { - open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { - var params: [String: Any]? + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? = nil // Encode the Encodable object if let encodableObj = encodableObj { @@ -27,7 +27,7 @@ open class JSONEncodingHelper { } open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { - var params: [String: Any]? + var params: [String: Any]? = nil if let encodableObj = encodableObj { do { @@ -41,5 +41,5 @@ open class JSONEncodingHelper { return params } - + } diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models.swift index c0542c14c0..11e81ffcc4 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,11 +10,11 @@ protocol JSONEncodable { func encodeToJSON() -> Any } -public enum ErrorResponse: Error { +public enum ErrorResponse : Error { case error(Int, Data?, Error) } -public enum DownloadException: Error { +public enum DownloadException : Error { case responseDataMissing case responseFailed case requestMissing @@ -30,6 +30,7 @@ public enum DecodableRequestBuilderError: Error { case generalError(Error) } + open class Response { public let statusCode: Int public let header: [String: String] @@ -43,7 +44,7 @@ open class Response { public convenience init(response: HTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String: String]() + var header = [String:String]() for (key, value) in rawHeader { if let key = key.base as? String, let value = value as? String { header[key] = value diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index e74820fd28..cab2fbb077 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -8,7 +8,8 @@ import Foundation /** Describes the result of uploading an image resource */ -public struct ApiResponse: Codable { +public struct ApiResponse: Codable { + public var code: Int? public var type: String? diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index fec18cc7a6..7006e56507 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -8,7 +8,8 @@ import Foundation /** A category for a pet */ -public struct Category: Codable { +public struct Category: Codable { + public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/InlineObject.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/InlineObject.swift index ac5216fe68..1c8072f6ba 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/InlineObject.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/InlineObject.swift @@ -7,7 +7,9 @@ import Foundation -public struct InlineObject: Codable { + +public struct InlineObject: Codable { + /** Updated name of the pet */ public var name: String? diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/InlineObject1.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/InlineObject1.swift index 1c2fd3255d..fa806b0729 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/InlineObject1.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/InlineObject1.swift @@ -7,7 +7,9 @@ import Foundation -public struct InlineObject1: Codable { + +public struct InlineObject1: Codable { + /** Additional data to pass to server */ public var additionalMetadata: String? diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index 1fa6995d1c..1adf3d7acc 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -9,7 +9,8 @@ import Foundation /** An order for a pets from the pet store */ @available(*, deprecated, message: "This schema is deprecated.") -public struct Order: Codable { +public struct Order: Codable { + public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index 622f2c9bd4..ffd5eb5d91 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -8,7 +8,8 @@ import Foundation /** A pet for sale in the pet store */ -public struct Pet: Codable { +public struct Pet: Codable { + public enum Status: String, Codable, CaseIterable { case available = "available" @@ -18,7 +19,7 @@ public struct Pet: Codable { public var id: Int64? public var category: Category? public var name: String? - + @available(*, deprecated, message: "This property is deprecated.") public var photoUrls: [String] public var tags: [Tag]? diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 98a78982e5..5599317474 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -8,7 +8,8 @@ import Foundation /** A tag for a pet */ -public struct Tag: Codable { +public struct Tag: Codable { + public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 4e42f6f285..ddf682b7dd 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -8,7 +8,8 @@ import Foundation /** A User who is purchasing from the pet store */ -public struct User: Codable { +public struct User: Codable { + public var id: Int64? public var username: String? diff --git a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 55d0eb4219..22261e2ce9 100644 --- a/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/deprecated/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -14,7 +14,7 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { return URLSessionRequestBuilder.self } - func getBuilder() -> RequestBuilder.Type { + func getBuilder() -> RequestBuilder.Type { return URLSessionDecodableRequestBuilder.self } } @@ -23,16 +23,16 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { private var urlSessionStore = SynchronizedDictionary() open class URLSessionRequestBuilder: RequestBuilder { - + private var observation: NSKeyValueObservation? - + deinit { observation?.invalidate() } - + // swiftlint:disable:next weak_delegate fileprivate let sessionDelegate = SessionDelegate() - + /** May be assigned if you want to control the authentication challenges. */ @@ -45,11 +45,11 @@ open class URLSessionRequestBuilder: RequestBuilder { - retry the request. */ public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + + 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 URLSession configuration. @@ -77,40 +77,40 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { - + open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) throws -> URLRequest { + guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL } - + var originalRequest = URLRequest(url: url) - + originalRequest.httpMethod = method.rawValue - + buildHeaders().forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + headers.forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) - + return modifiedRequest } override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { - let urlSessionId: String = UUID().uuidString + let urlSessionId:String = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() urlSessionStore[urlSessionId] = urlSession - + let parameters: [String: Any] = self.parameters ?? [:] - + let fileKeys = parameters.filter { $1 is URL } .map { $0.0 } - + let encoding: ParameterEncoding if fileKeys.count > 0 { encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) @@ -119,29 +119,29 @@ open class URLSessionRequestBuilder: RequestBuilder { } else { encoding = URLEncoding() } - + guard let xMethod = HTTPMethod(rawValue: method) else { fatalError("Unsuported Http method - \(method)") } - + let cleanupRequest = { urlSessionStore[urlSessionId] = nil self.observation?.invalidate() } - + do { let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) - + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in - + guard let self = self else { return } - + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { - + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in - + guard let self = self else { return } - + if shouldRetry { cleanupRequest() self.execute(apiResponseQueue, completion) @@ -157,13 +157,13 @@ open class URLSessionRequestBuilder: RequestBuilder { } } } - + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { onProgressReady?(dataTask.progress) } - + dataTask.resume() - + } catch { apiResponseQueue.async { cleanupRequest() @@ -172,7 +172,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -192,52 +192,52 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is URL.Type: do { - + guard error == nil else { throw DownloadException.responseFailed } - + guard let data = data else { throw DownloadException.responseDataMissing } - + let fileManager = FileManager.default 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: httpResponse.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(.success(Response(response: httpResponse, body: filePath as? T))) - + } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, requestParserError))) } catch let error { completion(.failure(ErrorResponse.error(400, data, error))) } - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + default: - + completion(.success(Response(response: httpResponse, body: data as? T))) } @@ -251,7 +251,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return httpHeaders } - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { guard let contentDisposition = contentDisposition else { return nil @@ -270,7 +270,7 @@ open class URLSessionRequestBuilder: RequestBuilder { filename = contentItem return filename? - .replacingCharacters(in: range, with: "") + .replacingCharacters(in: range, with:"") .replacingOccurrences(of: "\"", with: "") .trimmingCharacters(in: .whitespacesAndNewlines) } @@ -279,7 +279,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getPath(from url: URL) throws -> String { + fileprivate func getPath(from url : URL) throws -> String { guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { throw DownloadException.requestMissingPath @@ -293,7 +293,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { guard let url = urlRequest.url else { throw DownloadException.requestMissingURL @@ -304,7 +304,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } -open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { +open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -324,28 +324,28 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + case is Data.Type: - + completion(.success(Response(response: httpResponse, body: data as? T))) - + default: - + guard let data = data, !data.isEmpty else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) return } - + let decodeResult = CodableHelper.decode(T.self, from: data) - + switch decodeResult { case let .success(decodableObj): completion(.success(Response(response: httpResponse, body: decodableObj))) @@ -356,10 +356,10 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui } } -private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { - +fileprivate class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + var credential: URLCredential? - + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { @@ -402,13 +402,13 @@ public protocol ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest } -private class URLEncoding: ParameterEncoding { - func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { - +fileprivate class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String : Any]?) throws -> URLRequest { + var urlRequest = urlRequest - + guard let parameters = parameters else { return urlRequest } - + guard let url = urlRequest.url else { throw DownloadException.requestMissingURL } @@ -417,12 +417,12 @@ private class URLEncoding: ParameterEncoding { urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) urlRequest.url = urlComponents.url } - + return urlRequest } } -private class FileUploadEncoding: ParameterEncoding { +fileprivate class FileUploadEncoding: ParameterEncoding { let contentTypeForFormPart: (_ fileURL: URL) -> String? @@ -433,13 +433,13 @@ private class FileUploadEncoding: ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { var urlRequest = urlRequest - + guard let parameters = parameters, !parameters.isEmpty else { return urlRequest } - + let boundary = "Boundary-\(UUID().uuidString)" - + urlRequest.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") for (key, value) in parameters { @@ -479,7 +479,7 @@ private class FileUploadEncoding: ParameterEncoding { fatalError("Unprocessable value \(value) with key \(key)") } } - + var body = urlRequest.httpBody.orEmpty body.append("\r\n--\(boundary)--\r\n") @@ -494,7 +494,7 @@ private class FileUploadEncoding: ParameterEncoding { var urlRequest = urlRequest var body = urlRequest.httpBody.orEmpty - + let fileData = try Data(contentsOf: fileURL) let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) @@ -502,7 +502,7 @@ private class FileUploadEncoding: ParameterEncoding { let fileName = fileURL.lastPathComponent // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } @@ -518,20 +518,20 @@ private class FileUploadEncoding: ParameterEncoding { // The value data. body.append(fileData) - + urlRequest.httpBody = body return urlRequest } - + private func configureDataUploadRequest(urlRequest: URLRequest, boundary: String, name: String, data: Data) -> URLRequest { var urlRequest = urlRequest - + var body = urlRequest.httpBody.orEmpty // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } diff --git a/samples/client/petstore/swift5/nonPublicApi/Package.swift b/samples/client/petstore/swift5/nonPublicApi/Package.swift index 96dfff54ed..79f6f81887 100644 --- a/samples/client/petstore/swift5/nonPublicApi/Package.swift +++ b/samples/client/petstore/swift5/nonPublicApi/Package.swift @@ -14,7 +14,7 @@ let package = Package( // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "PetstoreClient", - targets: ["PetstoreClient"]) + targets: ["PetstoreClient"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. @@ -26,6 +26,6 @@ let package = Package( name: "PetstoreClient", dependencies: [], path: "PetstoreClient/Classes" - ) + ), ] ) diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 1a1716eb8a..799478f138 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -7,7 +7,7 @@ import Foundation internal struct APIHelper { - internal static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + 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 @@ -20,17 +20,17 @@ internal struct APIHelper { return destination } - internal static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + 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: ",") + if let collection = item.value as? Array { + 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]? { + internal static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { guard let source = source else { return nil } @@ -46,15 +46,15 @@ internal struct APIHelper { } internal static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { + if let collection = source as? Array { return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") } return source } - internal static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + 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?] { + if let collection = item.value as? Array { collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } @@ -69,3 +69,4 @@ internal struct APIHelper { return destination } } + diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift index 5dfbd9cea8..7fa1e45632 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,15 +9,15 @@ 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 customHeaders: [String:String] = [:] internal static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() internal static var apiResponseQueue: DispatchQueue = .main } internal class RequestBuilder { var credential: URLCredential? - var headers: [String: String] - internal let parameters: [String: Any]? + var headers: [String:String] + internal let parameters: [String:Any]? internal let isBody: Bool internal let method: String internal let URLString: String @@ -25,9 +25,9 @@ internal class RequestBuilder { /// Optional block to obtain a reference to the request's progress instance when available. /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. /// If you need to get the request's progress in older OS versions, please use Alamofire http client. - internal var onProgressReady: ((Progress) -> Void)? + internal var onProgressReady: ((Progress) -> ())? - required internal init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required internal init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters @@ -37,7 +37,7 @@ internal class RequestBuilder { addHeaders(PetstoreClientAPI.customHeaders) } - internal func addHeaders(_ aHeaders: [String: String]) { + internal func addHeaders(_ aHeaders:[String:String]) { for (header, value) in aHeaders { headers[header] = value } @@ -60,5 +60,5 @@ internal class RequestBuilder { internal protocol RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type } diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 174e6c12ae..81f23f107a 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -7,6 +7,8 @@ import Foundation + + internal class AnotherFakeAPI { /** To test special tags @@ -15,7 +17,7 @@ internal class AnotherFakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + internal class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index ab1b8f0924..e52322c01c 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -7,6 +7,8 @@ import Foundation + + internal class FakeAPI { /** @@ -14,7 +16,7 @@ internal class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { + internal class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?,_ error: Error?) -> Void)) { fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -49,7 +51,7 @@ internal class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { + internal class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?,_ error: Error?) -> Void)) { fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -84,7 +86,7 @@ internal class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { + internal class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?,_ error: Error?) -> Void)) { fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -119,7 +121,7 @@ internal class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + internal class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -154,7 +156,7 @@ internal class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + internal class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -190,7 +192,7 @@ internal class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + internal class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -229,7 +231,7 @@ internal class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + internal class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -279,7 +281,7 @@ internal class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, 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(apiResponseQueue) { result -> Void in switch result { case .success: @@ -316,7 +318,7 @@ internal class FakeAPI { 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?] = [ + let formParams: [String:Any?] = [ "integer": integer?.encodeToJSON(), "int32": int32?.encodeToJSON(), "int64": int64?.encodeToJSON(), @@ -335,7 +337,7 @@ internal class FakeAPI { let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -424,7 +426,7 @@ internal class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, 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(apiResponseQueue) { result -> Void in switch result { case .success: @@ -452,19 +454,19 @@ internal class FakeAPI { 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?] = [ + 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_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), "enum_query_double": enumQueryDouble?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -490,7 +492,7 @@ internal class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + internal class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -516,13 +518,13 @@ internal class FakeAPI { 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 - + 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(), + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), "int64_group": int64Group?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -543,7 +545,7 @@ internal class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + internal class func testInlineAdditionalProperties(param: [String:String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -560,7 +562,7 @@ internal class FakeAPI { - parameter param: (body) request body - returns: RequestBuilder */ - internal class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> 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) @@ -580,7 +582,7 @@ internal class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + internal class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -601,14 +603,14 @@ internal class FakeAPI { internal class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { let path = "/fake/jsonFormData" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + 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() diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index 548c5fb352..969fc92e02 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -7,6 +7,8 @@ import Foundation + + internal class FakeClassnameTags123API { /** To test class name in snake case @@ -15,7 +17,7 @@ internal class FakeClassnameTags123API { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + internal class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index cb54fce0dc..d4b32bb967 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -7,6 +7,8 @@ import Foundation + + internal class PetAPI { /** Add a new pet to the store @@ -15,7 +17,7 @@ internal class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + internal class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -55,7 +57,7 @@ internal class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func deletePet(apiKey: String? = nil, petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + internal class func deletePet(apiKey: String? = nil, petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deletePetWithRequestBuilder(apiKey: apiKey, petId: petId).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -82,8 +84,8 @@ internal class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let nillableHeaders: [String: Any?] = [ "api_key": apiKey?.encodeToJSON() @@ -111,7 +113,7 @@ internal class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + internal class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -135,8 +137,8 @@ internal class PetAPI { internal class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "status": status.encodeToJSON() @@ -155,7 +157,7 @@ internal class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ @available(*, deprecated, message: "This operation is deprecated.") - internal class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + internal class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -180,8 +182,8 @@ internal class PetAPI { internal class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tags": tags.encodeToJSON() @@ -199,7 +201,7 @@ internal class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { + internal class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?,_ error: Error?) -> Void)) { getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -226,8 +228,8 @@ internal class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -242,7 +244,7 @@ internal class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + internal class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -283,7 +285,7 @@ internal class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + internal class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -311,14 +313,14 @@ internal class PetAPI { 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?] = [ + 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() @@ -335,7 +337,7 @@ internal class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + internal class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -363,14 +365,14 @@ internal class PetAPI { 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?] = [ + 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() @@ -387,7 +389,7 @@ internal class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func uploadFileWithRequiredFile(petId: Int64, additionalMetadata: String? = nil, requiredFile: URL, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + internal class func uploadFileWithRequiredFile(petId: Int64, additionalMetadata: String? = nil, requiredFile: URL, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequiredFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, requiredFile: requiredFile).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -415,14 +417,14 @@ internal class PetAPI { 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?] = [ + 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() diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index f1e423111d..528a19a903 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -7,6 +7,8 @@ import Foundation + + internal class StoreAPI { /** Delete purchase order by ID @@ -15,7 +17,7 @@ internal class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + internal class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -39,8 +41,8 @@ internal class StoreAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -54,7 +56,7 @@ internal class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { + internal class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String:Int]?,_ error: Error?) -> Void)) { getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -74,14 +76,14 @@ internal class StoreAPI { - name: api_key - returns: RequestBuilder<[String:Int]> */ - internal class func getInventoryWithRequestBuilder() -> 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + let requestBuilder: RequestBuilder<[String:Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } @@ -93,7 +95,7 @@ internal class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + internal class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -117,8 +119,8 @@ internal class StoreAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -133,7 +135,7 @@ internal class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + internal class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index c8d714e899..298a7fee48 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -7,6 +7,8 @@ import Foundation + + internal class UserAPI { /** Create user @@ -15,7 +17,7 @@ internal class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + internal class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -52,7 +54,7 @@ internal class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + internal class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -88,7 +90,7 @@ internal class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + internal class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -124,7 +126,7 @@ internal class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + internal class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -148,8 +150,8 @@ internal class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -164,7 +166,7 @@ internal class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { + internal class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?,_ error: Error?) -> Void)) { getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -187,8 +189,8 @@ internal class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -204,7 +206,7 @@ internal class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + internal class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -226,11 +228,11 @@ internal class UserAPI { internal class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), + "username": username.encodeToJSON(), "password": password.encodeToJSON() ]) @@ -245,7 +247,7 @@ internal class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + internal class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -264,8 +266,8 @@ internal class UserAPI { internal class func logoutUserWithRequestBuilder() -> RequestBuilder { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -281,7 +283,7 @@ internal class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - internal class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + internal class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift index 280238b826..1fcfa10986 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -45,4 +45,4 @@ internal class CodableHelper { internal class func encode(_ value: T) -> Swift.Result where T: Encodable { return Swift.Result { try self.jsonEncoder.encode(value) } } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Configuration.swift index 4dfbe7b0cd..400d8bd126 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -7,10 +7,10 @@ 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. @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") internal static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} + +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift index e5511b3aa3..f7550a684a 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -108,24 +108,24 @@ extension String: CodingKey { extension KeyedEncodingContainerProtocol { - internal mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + 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 { + 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 { + 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 { + internal mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { if let pairs = pairs { try encodeMap(pairs) } @@ -135,7 +135,7 @@ extension KeyedEncodingContainerProtocol { extension KeyedDecodingContainerProtocol { - internal func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + internal func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { var tmpArray = [T]() var nestedContainer = try nestedUnkeyedContainer(forKey: key) @@ -147,8 +147,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - internal func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? + internal func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil if contains(key) { tmpArray = try decodeArray(T.self, forKey: key) @@ -157,8 +157,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - internal func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] + 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) { @@ -177,3 +177,5 @@ extension HTTPURLResponse { return Array(200 ..< 300).contains(statusCode) } } + + diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index 6b69f3b1bd..332e960ac6 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -41,7 +41,7 @@ internal struct JSONDataEncoding { } internal static func encodingParameters(jsonData: Data?) -> [String: Any]? { - var returnedParams: [String: Any]? + var returnedParams: [String: Any]? = nil if let jsonData = jsonData, !jsonData.isEmpty { var params: [String: Any] = [:] params[jsonDataKey] = jsonData diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 7d8f433dfe..47329d53ee 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -9,8 +9,8 @@ import Foundation internal class JSONEncodingHelper { - internal class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { - var params: [String: Any]? + internal class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? = nil // Encode the Encodable object if let encodableObj = encodableObj { @@ -27,7 +27,7 @@ internal class JSONEncodingHelper { } internal class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { - var params: [String: Any]? + var params: [String: Any]? = nil if let encodableObj = encodableObj { do { @@ -41,5 +41,5 @@ internal class JSONEncodingHelper { return params } - + } diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift index 6089ac67d0..236120acc1 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,11 +10,11 @@ protocol JSONEncodable { func encodeToJSON() -> Any } -internal enum ErrorResponse: Error { +internal enum ErrorResponse : Error { case error(Int, Data?, Error) } -internal enum DownloadException: Error { +internal enum DownloadException : Error { case responseDataMissing case responseFailed case requestMissing @@ -30,6 +30,7 @@ internal enum DecodableRequestBuilderError: Error { case generalError(Error) } + internal class Response { internal let statusCode: Int internal let header: [String: String] @@ -43,7 +44,7 @@ internal class Response { internal convenience init(response: HTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String: String]() + var header = [String:String]() for (key, value) in rawHeader { if let key = key.base as? String, let value = value as? String { header[key] = value diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index b4d5ae6faf..c8876320f4 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -7,17 +7,19 @@ import Foundation -internal struct AdditionalPropertiesClass: Codable { - internal var mapString: [String: String]? - internal var mapMapString: [String: [String: String]]? +internal struct AdditionalPropertiesClass: Codable { - internal init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + + 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, CaseIterable { + internal enum CodingKeys: String, CodingKey, CaseIterable { case mapString = "map_string" case mapMapString = "map_map_string" } diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index ada7f86de5..20d157f4eb 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -7,7 +7,9 @@ import Foundation -internal struct Animal: Codable { + +internal struct Animal: Codable { + internal var className: String internal var color: String? = "red" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift index 3ebe9e9a5d..9c57035085 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -7,4 +7,5 @@ import Foundation + internal typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index b60d8999b4..88b4b69c16 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -7,7 +7,9 @@ import Foundation -internal struct ApiResponse: Codable { + +internal struct ApiResponse: Codable { + internal var code: Int? internal var type: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 67371b816b..3e8bc3da83 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -internal struct ArrayOfArrayOfNumberOnly: Codable { + +internal struct ArrayOfArrayOfNumberOnly: Codable { + internal var arrayArrayNumber: [[Double]]? @@ -15,7 +17,7 @@ internal struct ArrayOfArrayOfNumberOnly: Codable { self.arrayArrayNumber = arrayArrayNumber } - internal enum CodingKeys: String, CodingKey, CaseIterable { + internal enum CodingKeys: String, CodingKey, CaseIterable { case arrayArrayNumber = "ArrayArrayNumber" } diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index 2c7047eac4..8e92c78e4d 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -internal struct ArrayOfNumberOnly: Codable { + +internal struct ArrayOfNumberOnly: Codable { + internal var arrayNumber: [Double]? @@ -15,7 +17,7 @@ internal struct ArrayOfNumberOnly: Codable { self.arrayNumber = arrayNumber } - internal enum CodingKeys: String, CodingKey, CaseIterable { + internal enum CodingKeys: String, CodingKey, CaseIterable { case arrayNumber = "ArrayNumber" } diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index 9c3a3a9f5e..d7916cf20b 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -7,7 +7,9 @@ import Foundation -internal struct ArrayTest: Codable { + +internal struct ArrayTest: Codable { + internal var arrayOfString: [String]? internal var arrayArrayOfInteger: [[Int64]]? @@ -19,7 +21,7 @@ internal struct ArrayTest: Codable { self.arrayArrayOfModel = arrayArrayOfModel } - internal enum CodingKeys: String, CodingKey, CaseIterable { + internal enum CodingKeys: String, CodingKey, CaseIterable { case arrayOfString = "array_of_string" case arrayArrayOfInteger = "array_array_of_integer" case arrayArrayOfModel = "array_array_of_model" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index 965ec5aefb..17221a54ed 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -7,7 +7,9 @@ import Foundation -internal struct Capitalization: Codable { + +internal struct Capitalization: Codable { + internal var smallCamel: String? internal var capitalCamel: String? @@ -26,7 +28,7 @@ internal struct Capitalization: Codable { self.ATT_NAME = ATT_NAME } - internal enum CodingKeys: String, CodingKey, CaseIterable { + internal enum CodingKeys: String, CodingKey, CaseIterable { case smallCamel case capitalCamel = "CapitalCamel" case smallSnake = "small_Snake" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 8a603dee5f..28292469dd 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -7,7 +7,9 @@ import Foundation -internal struct Cat: Codable { + +internal struct Cat: Codable { + internal var className: String internal var color: String? = "red" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index 45b7dbb26d..cdcb1aa14b 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -7,7 +7,9 @@ import Foundation -internal struct CatAllOf: Codable { + +internal struct CatAllOf: Codable { + internal var declawed: Bool? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index 849bf788df..9b061937e0 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,7 +7,9 @@ import Foundation -internal struct Category: Codable { + +internal struct Category: Codable { + internal var id: Int64? internal var name: String = "default-name" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 0f1bc19fe5..034cbadc8d 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model with \"_class\" property */ -internal struct ClassModel: Codable { +internal struct ClassModel: Codable { + internal var _class: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index ddee836043..e33907ca3a 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -7,7 +7,9 @@ import Foundation -internal struct Client: Codable { + +internal struct Client: Codable { + internal var client: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 6b5250de4a..3d45b8ac7a 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -7,7 +7,9 @@ import Foundation -internal struct Dog: Codable { + +internal struct Dog: Codable { + internal var className: String internal var color: String? = "red" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index ef3ff7f1d7..6fb9a05051 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -7,7 +7,9 @@ import Foundation -internal struct DogAllOf: Codable { + +internal struct DogAllOf: Codable { + internal var breed: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index bb9f64cfb4..8aa9c2bd58 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -7,7 +7,9 @@ import Foundation -internal struct EnumArrays: Codable { + +internal struct EnumArrays: Codable { + internal enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" @@ -25,7 +27,7 @@ internal struct EnumArrays: Codable { self.arrayEnum = arrayEnum } - internal enum CodingKeys: String, CodingKey, CaseIterable { + internal enum CodingKeys: String, CodingKey, CaseIterable { case justSymbol = "just_symbol" case arrayEnum = "array_enum" } diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift index 71fd29e0d2..07dfc16a69 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -7,6 +7,7 @@ import Foundation + internal enum EnumClass: String, Codable, CaseIterable { case abc = "_abc" case efg = "-efg" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 421aa5436b..4081beae4c 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -7,7 +7,9 @@ import Foundation -internal struct EnumTest: Codable { + +internal struct EnumTest: Codable { + internal enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" @@ -41,7 +43,7 @@ internal struct EnumTest: Codable { self.outerEnum = outerEnum } - internal enum CodingKeys: String, CodingKey, CaseIterable { + internal enum CodingKeys: String, CodingKey, CaseIterable { case enumString = "enum_string" case enumStringRequired = "enum_string_required" case enumInteger = "enum_integer" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/File.swift index 632402fb9e..166138041e 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -8,7 +8,8 @@ import Foundation /** Must be named `File` for test. */ -internal struct File: Codable { +internal struct File: Codable { + /** Test capitalization */ internal var sourceURI: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index e478e6c4b7..2245e94bcc 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -7,7 +7,9 @@ import Foundation -internal struct FileSchemaTestClass: Codable { + +internal struct FileSchemaTestClass: Codable { + internal var file: File? internal var files: [File]? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 23395c93b5..30b11efb2e 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -7,7 +7,9 @@ import Foundation -internal struct FormatTest: Codable { + +internal struct FormatTest: Codable { + internal var integer: Int? internal var int32: Int? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 831963ba2e..d51b4421df 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -7,7 +7,9 @@ import Foundation -internal struct HasOnlyReadOnly: Codable { + +internal struct HasOnlyReadOnly: Codable { + internal var bar: String? internal var foo: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/List.swift index c5960de215..0a76cba0ed 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -7,7 +7,9 @@ import Foundation -internal struct List: Codable { + +internal struct List: Codable { + internal var _123list: String? @@ -15,7 +17,7 @@ internal struct List: Codable { self._123list = _123list } - internal enum CodingKeys: String, CodingKey, CaseIterable { + internal enum CodingKeys: String, CodingKey, CaseIterable { case _123list = "123-list" } diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index db4f8f436a..b0a860092b 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -7,25 +7,27 @@ import Foundation -internal struct MapTest: Codable { + +internal struct MapTest: Codable { + internal enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" case lower = "lower" } - internal var mapMapOfString: [String: [String: String]]? - internal var mapOfEnumString: [String: String]? - internal var directMap: [String: Bool]? + 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?) { + 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, CaseIterable { + internal enum CodingKeys: String, CodingKey, CaseIterable { case mapMapOfString = "map_map_of_string" case mapOfEnumString = "map_of_enum_string" case directMap = "direct_map" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c71bb9256b..c6fa4baaec 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -7,13 +7,15 @@ import Foundation -internal struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + +internal struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + internal var uuid: UUID? internal var dateTime: Date? - internal var map: [String: Animal]? + internal var map: [String:Animal]? - internal init(uuid: UUID?, dateTime: Date?, 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/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index 5d31a885f7..2a81b0ac92 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model name starting with number */ -internal struct Model200Response: Codable { +internal struct Model200Response: Codable { + internal var name: Int? internal var _class: String? @@ -18,7 +19,7 @@ internal struct Model200Response: Codable { self._class = _class } - internal enum CodingKeys: String, CodingKey, CaseIterable { + internal enum CodingKeys: String, CodingKey, CaseIterable { case name case _class = "class" } diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 2aa8fb1524..5c7df21487 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model name same as property name */ -internal struct Name: Codable { +internal struct Name: Codable { + internal var name: Int internal var snakeCase: Int? @@ -22,7 +23,7 @@ internal struct Name: Codable { self._123number = _123number } - internal enum CodingKeys: String, CodingKey, CaseIterable { + internal enum CodingKeys: String, CodingKey, CaseIterable { case name case snakeCase = "snake_case" case property diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 49d73706e3..3473e70164 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -internal struct NumberOnly: Codable { + +internal struct NumberOnly: Codable { + internal var justNumber: Double? @@ -15,7 +17,7 @@ internal struct NumberOnly: Codable { self.justNumber = justNumber } - internal enum CodingKeys: String, CodingKey, CaseIterable { + internal enum CodingKeys: String, CodingKey, CaseIterable { case justNumber = "JustNumber" } diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index dcefb40efa..b6fd07e148 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,7 +7,9 @@ import Foundation -internal struct Order: Codable { + +internal struct Order: Codable { + internal enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index c61c2c4a46..592f9a849c 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -7,7 +7,9 @@ import Foundation -internal struct OuterComposite: Codable { + +internal struct OuterComposite: Codable { + internal var myNumber: Double? internal var myString: String? @@ -19,7 +21,7 @@ internal struct OuterComposite: Codable { self.myBoolean = myBoolean } - internal enum CodingKeys: String, CodingKey, CaseIterable { + internal enum CodingKeys: String, CodingKey, CaseIterable { case myNumber = "my_number" case myString = "my_string" case myBoolean = "my_boolean" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift index e0cdcbea05..ab1397d4f3 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -7,6 +7,7 @@ import Foundation + internal enum OuterEnum: String, Codable, CaseIterable { case placed = "placed" case approved = "approved" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index b71700544d..0cf0f0d3b4 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,7 +7,9 @@ import Foundation -internal struct Pet: Codable { + +internal struct Pet: Codable { + internal enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index d02c6cc5fd..8792cf4aa7 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -7,7 +7,9 @@ import Foundation -internal struct ReadOnlyFirst: Codable { + +internal struct ReadOnlyFirst: Codable { + internal var bar: String? internal var baz: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index 95a18b571a..82b73db4b3 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing reserved words */ -internal struct Return: Codable { +internal struct Return: Codable { + internal var _return: Int? @@ -16,7 +17,7 @@ internal struct Return: Codable { self._return = _return } - internal enum CodingKeys: String, CodingKey, CaseIterable { + internal enum CodingKeys: String, CodingKey, CaseIterable { case _return = "return" } diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index b6ac3651f0..e98a8fd795 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -7,7 +7,9 @@ import Foundation -internal struct SpecialModelName: Codable { + +internal struct SpecialModelName: Codable { + internal var specialPropertyName: Int64? @@ -15,7 +17,7 @@ internal struct SpecialModelName: Codable { self.specialPropertyName = specialPropertyName } - internal enum CodingKeys: String, CodingKey, CaseIterable { + internal enum CodingKeys: String, CodingKey, CaseIterable { case specialPropertyName = "$special[property.name]" } diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index dc3d00e130..d1afe6732a 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -7,9 +7,12 @@ import Foundation -internal struct StringBooleanMap: Codable { - internal var additionalProperties: [String: Bool] = [:] +internal struct StringBooleanMap: Codable { + + + + internal var additionalProperties: [String:Bool] = [:] internal subscript(key: String) -> Bool? { get { @@ -42,4 +45,5 @@ internal struct StringBooleanMap: Codable { additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) } + } diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 1e4de951fb..923acc9b1f 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,7 +7,9 @@ import Foundation -internal struct Tag: Codable { + +internal struct Tag: Codable { + internal var id: Int64? internal var name: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index 83908bb4fc..e78ae839f5 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -7,7 +7,9 @@ import Foundation -internal struct TypeHolderDefault: Codable { + +internal struct TypeHolderDefault: Codable { + internal var stringItem: String = "what" internal var numberItem: Double @@ -23,7 +25,7 @@ internal struct TypeHolderDefault: Codable { self.arrayItem = arrayItem } - internal enum CodingKeys: String, CodingKey, CaseIterable { + internal enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 3e2c6193aa..c829014f0d 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -7,7 +7,9 @@ import Foundation -internal struct TypeHolderExample: Codable { + +internal struct TypeHolderExample: Codable { + internal var stringItem: String internal var numberItem: Double @@ -23,7 +25,7 @@ internal struct TypeHolderExample: Codable { self.arrayItem = arrayItem } - internal enum CodingKeys: String, CodingKey, CaseIterable { + internal enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/User.swift index ada8a7f82d..c2865a5792 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,7 +7,9 @@ import Foundation -internal struct User: Codable { + +internal struct User: Codable { + internal var id: Int64? internal var username: String? diff --git a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index a907ec1d34..bf6cc62224 100644 --- a/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/nonPublicApi/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -14,7 +14,7 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { return URLSessionRequestBuilder.self } - func getBuilder() -> RequestBuilder.Type { + func getBuilder() -> RequestBuilder.Type { return URLSessionDecodableRequestBuilder.self } } @@ -23,16 +23,16 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { private var urlSessionStore = SynchronizedDictionary() internal class URLSessionRequestBuilder: RequestBuilder { - + private var observation: NSKeyValueObservation? - + deinit { observation?.invalidate() } - + // swiftlint:disable:next weak_delegate fileprivate let sessionDelegate = SessionDelegate() - + /** May be assigned if you want to control the authentication challenges. */ @@ -45,11 +45,11 @@ internal class URLSessionRequestBuilder: RequestBuilder { - retry the request. */ internal var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - - required internal init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + + 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 URLSession configuration. @@ -77,40 +77,40 @@ internal class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - internal func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { - + internal func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) throws -> URLRequest { + guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL } - + var originalRequest = URLRequest(url: url) - + originalRequest.httpMethod = method.rawValue - + buildHeaders().forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + headers.forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) - + return modifiedRequest } override internal func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { - let urlSessionId: String = UUID().uuidString + let urlSessionId:String = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() urlSessionStore[urlSessionId] = urlSession - + let parameters: [String: Any] = self.parameters ?? [:] - + let fileKeys = parameters.filter { $1 is URL } .map { $0.0 } - + let encoding: ParameterEncoding if fileKeys.count > 0 { encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) @@ -119,29 +119,29 @@ internal class URLSessionRequestBuilder: RequestBuilder { } else { encoding = URLEncoding() } - + guard let xMethod = HTTPMethod(rawValue: method) else { fatalError("Unsuported Http method - \(method)") } - + let cleanupRequest = { urlSessionStore[urlSessionId] = nil self.observation?.invalidate() } - + do { let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) - + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in - + guard let self = self else { return } - + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { - + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in - + guard let self = self else { return } - + if shouldRetry { cleanupRequest() self.execute(apiResponseQueue, completion) @@ -157,13 +157,13 @@ internal class URLSessionRequestBuilder: RequestBuilder { } } } - + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { onProgressReady?(dataTask.progress) } - + dataTask.resume() - + } catch { apiResponseQueue.async { cleanupRequest() @@ -172,7 +172,7 @@ internal class URLSessionRequestBuilder: RequestBuilder { } } - + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -192,52 +192,52 @@ internal class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is URL.Type: do { - + guard error == nil else { throw DownloadException.responseFailed } - + guard let data = data else { throw DownloadException.responseDataMissing } - + let fileManager = FileManager.default 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: httpResponse.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(.success(Response(response: httpResponse, body: filePath as? T))) - + } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, requestParserError))) } catch let error { completion(.failure(ErrorResponse.error(400, data, error))) } - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + default: - + completion(.success(Response(response: httpResponse, body: data as? T))) } @@ -251,7 +251,7 @@ internal class URLSessionRequestBuilder: RequestBuilder { return httpHeaders } - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { guard let contentDisposition = contentDisposition else { return nil @@ -270,7 +270,7 @@ internal class URLSessionRequestBuilder: RequestBuilder { filename = contentItem return filename? - .replacingCharacters(in: range, with: "") + .replacingCharacters(in: range, with:"") .replacingOccurrences(of: "\"", with: "") .trimmingCharacters(in: .whitespacesAndNewlines) } @@ -279,7 +279,7 @@ internal class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getPath(from url: URL) throws -> String { + fileprivate func getPath(from url : URL) throws -> String { guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { throw DownloadException.requestMissingPath @@ -293,7 +293,7 @@ internal class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { guard let url = urlRequest.url else { throw DownloadException.requestMissingURL @@ -304,7 +304,7 @@ internal class URLSessionRequestBuilder: RequestBuilder { } -internal class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { +internal class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -324,28 +324,28 @@ internal class URLSessionDecodableRequestBuilder: URLSessionReques switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + case is Data.Type: - + completion(.success(Response(response: httpResponse, body: data as? T))) - + default: - + guard let data = data, !data.isEmpty else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) return } - + let decodeResult = CodableHelper.decode(T.self, from: data) - + switch decodeResult { case let .success(decodableObj): completion(.success(Response(response: httpResponse, body: decodableObj))) @@ -356,10 +356,10 @@ internal class URLSessionDecodableRequestBuilder: URLSessionReques } } -private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { - +fileprivate class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + var credential: URLCredential? - + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { @@ -402,13 +402,13 @@ internal protocol ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest } -private class URLEncoding: ParameterEncoding { - func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { - +fileprivate class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String : Any]?) throws -> URLRequest { + var urlRequest = urlRequest - + guard let parameters = parameters else { return urlRequest } - + guard let url = urlRequest.url else { throw DownloadException.requestMissingURL } @@ -417,12 +417,12 @@ private class URLEncoding: ParameterEncoding { urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) urlRequest.url = urlComponents.url } - + return urlRequest } } -private class FileUploadEncoding: ParameterEncoding { +fileprivate class FileUploadEncoding: ParameterEncoding { let contentTypeForFormPart: (_ fileURL: URL) -> String? @@ -433,13 +433,13 @@ private class FileUploadEncoding: ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { var urlRequest = urlRequest - + guard let parameters = parameters, !parameters.isEmpty else { return urlRequest } - + let boundary = "Boundary-\(UUID().uuidString)" - + urlRequest.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") for (key, value) in parameters { @@ -479,7 +479,7 @@ private class FileUploadEncoding: ParameterEncoding { fatalError("Unprocessable value \(value) with key \(key)") } } - + var body = urlRequest.httpBody.orEmpty body.append("\r\n--\(boundary)--\r\n") @@ -494,7 +494,7 @@ private class FileUploadEncoding: ParameterEncoding { var urlRequest = urlRequest var body = urlRequest.httpBody.orEmpty - + let fileData = try Data(contentsOf: fileURL) let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) @@ -502,7 +502,7 @@ private class FileUploadEncoding: ParameterEncoding { let fileName = fileURL.lastPathComponent // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } @@ -518,20 +518,20 @@ private class FileUploadEncoding: ParameterEncoding { // The value data. body.append(fileData) - + urlRequest.httpBody = body return urlRequest } - + private func configureDataUploadRequest(urlRequest: URLRequest, boundary: String, name: String, data: Data) -> URLRequest { var urlRequest = urlRequest - + var body = urlRequest.httpBody.orEmpty // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } diff --git a/samples/client/petstore/swift5/objcCompatible/Package.swift b/samples/client/petstore/swift5/objcCompatible/Package.swift index 96dfff54ed..79f6f81887 100644 --- a/samples/client/petstore/swift5/objcCompatible/Package.swift +++ b/samples/client/petstore/swift5/objcCompatible/Package.swift @@ -14,7 +14,7 @@ let package = Package( // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "PetstoreClient", - targets: ["PetstoreClient"]) + targets: ["PetstoreClient"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. @@ -26,6 +26,6 @@ let package = Package( name: "PetstoreClient", dependencies: [], path: "PetstoreClient/Classes" - ) + ), ] ) diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 5b09f95571..2404bc8ffc 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -7,7 +7,7 @@ import Foundation public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + 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 @@ -20,17 +20,17 @@ public struct APIHelper { return destination } - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + 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: ",") + if let collection = item.value as? Array { + 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]? { + public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { guard let source = source else { return nil } @@ -46,15 +46,15 @@ public struct APIHelper { } public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { + if let collection = source as? Array { return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") } return source } - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + 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?] { + if let collection = item.value as? Array { collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } @@ -69,3 +69,4 @@ public struct APIHelper { return destination } } + diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift index a5c2d605df..c5d1b9b42d 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,15 +9,15 @@ 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 customHeaders: [String:String] = [:] public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() public static var apiResponseQueue: DispatchQueue = .main } open class RequestBuilder { var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? + var headers: [String:String] + public let parameters: [String:Any]? public let isBody: Bool public let method: String public let URLString: String @@ -25,9 +25,9 @@ open class RequestBuilder { /// Optional block to obtain a reference to the request's progress instance when available. /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. /// If you need to get the request's progress in older OS versions, please use Alamofire http client. - public var onProgressReady: ((Progress) -> Void)? + public var onProgressReady: ((Progress) -> ())? - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters @@ -37,7 +37,7 @@ open class RequestBuilder { addHeaders(PetstoreClientAPI.customHeaders) } - open func addHeaders(_ aHeaders: [String: String]) { + open func addHeaders(_ aHeaders:[String:String]) { for (header, value) in aHeaders { headers[header] = value } @@ -60,5 +60,5 @@ open class RequestBuilder { public protocol RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 2e9ad96a66..41731036ab 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -7,7 +7,9 @@ import Foundation -@objc open class AnotherFakeAPI: NSObject { + + +@objc open class AnotherFakeAPI : NSObject { /** To test special tags @@ -15,7 +17,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 6483ab29bc..fc51b00222 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -7,14 +7,16 @@ import Foundation -@objc open class FakeAPI: NSObject { + + +@objc open class FakeAPI : NSObject { /** - parameter body: (body) Input boolean as post body (optional) - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { + open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?,_ error: Error?) -> Void)) { fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -49,7 +51,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?,_ error: Error?) -> Void)) { fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -84,7 +86,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { + open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?,_ error: Error?) -> Void)) { fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -119,7 +121,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -154,7 +156,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -190,7 +192,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -229,7 +231,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -279,7 +281,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, 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(apiResponseQueue) { result -> Void in switch result { case .success: @@ -316,7 +318,7 @@ import Foundation 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?] = [ + let formParams: [String:Any?] = [ "integer": integer?.encodeToJSON(), "int32": int32?.encodeToJSON(), "int64": int64?.encodeToJSON(), @@ -335,7 +337,7 @@ import Foundation let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -424,7 +426,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, 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(apiResponseQueue) { result -> Void in switch result { case .success: @@ -452,19 +454,19 @@ import Foundation 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?] = [ + 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_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), "enum_query_double": enumQueryDouble?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -490,7 +492,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -516,13 +518,13 @@ import Foundation 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 - + 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(), + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), "int64_group": int64Group?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -543,7 +545,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testInlineAdditionalProperties(param: [String:String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -560,7 +562,7 @@ import Foundation - parameter param: (body) request body - returns: RequestBuilder */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> 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) @@ -580,7 +582,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -601,14 +603,14 @@ import Foundation open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { let path = "/fake/jsonFormData" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + 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() diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index b9cfc75eeb..3793f6dc41 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -7,7 +7,9 @@ import Foundation -@objc open class FakeClassnameTags123API: NSObject { + + +@objc open class FakeClassnameTags123API : NSObject { /** To test class name in snake case @@ -15,7 +17,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index d022b68773..86c6dcc977 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -7,7 +7,9 @@ import Foundation -@objc open class PetAPI: NSObject { + + +@objc open class PetAPI : NSObject { /** Add a new pet to the store @@ -15,7 +17,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -55,7 +57,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -82,8 +84,8 @@ import Foundation 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let nillableHeaders: [String: Any?] = [ "api_key": apiKey?.encodeToJSON() @@ -111,7 +113,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -135,8 +137,8 @@ import Foundation open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "status": status.encodeToJSON() @@ -155,7 +157,7 @@ import Foundation - parameter completion: completion handler to receive the data and the error objects */ @available(*, deprecated, message: "This operation is deprecated.") - open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -180,8 +182,8 @@ import Foundation open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tags": tags.encodeToJSON() @@ -199,7 +201,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { + open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?,_ error: Error?) -> Void)) { getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -226,8 +228,8 @@ import Foundation 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -242,7 +244,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -283,7 +285,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -311,14 +313,14 @@ import Foundation 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?] = [ + 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() @@ -335,7 +337,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -363,14 +365,14 @@ import Foundation 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?] = [ + 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() @@ -387,7 +389,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -415,14 +417,14 @@ import Foundation 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?] = [ + 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() diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index a19d12c7d2..cc15cd3ae8 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -7,7 +7,9 @@ import Foundation -@objc open class StoreAPI: NSObject { + + +@objc open class StoreAPI : NSObject { /** Delete purchase order by ID @@ -15,7 +17,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -39,8 +41,8 @@ import Foundation 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -54,7 +56,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String:Int]?,_ error: Error?) -> Void)) { getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -74,14 +76,14 @@ import Foundation - name: api_key - returns: RequestBuilder<[String:Int]> */ - open class func getInventoryWithRequestBuilder() -> 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + let requestBuilder: RequestBuilder<[String:Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } @@ -93,7 +95,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -117,8 +119,8 @@ import Foundation 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -133,7 +135,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index 4dfe4da1a0..6e0e10bc7b 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -7,7 +7,9 @@ import Foundation -@objc open class UserAPI: NSObject { + + +@objc open class UserAPI : NSObject { /** Create user @@ -15,7 +17,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -52,7 +54,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -88,7 +90,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -124,7 +126,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -148,8 +150,8 @@ import Foundation 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -164,7 +166,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { + open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?,_ error: Error?) -> Void)) { getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -187,8 +189,8 @@ import Foundation 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -204,7 +206,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -226,11 +228,11 @@ import Foundation open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), + "username": username.encodeToJSON(), "password": password.encodeToJSON() ]) @@ -245,7 +247,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -264,8 +266,8 @@ import Foundation open class func logoutUserWithRequestBuilder() -> RequestBuilder { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -281,7 +283,7 @@ import Foundation - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift index ef971ebadc..01b28a4bd4 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -45,4 +45,4 @@ open class CodableHelper { open class func encode(_ value: T) -> Swift.Result where T: Encodable { return Swift.Result { try self.jsonEncoder.encode(value) } } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Configuration.swift index 627d9adb75..f171525e43 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -7,10 +7,10 @@ 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. @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} + +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 93ed6b90b3..6e279679c6 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -108,24 +108,24 @@ extension String: CodingKey { extension KeyedEncodingContainerProtocol { - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + 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 { + 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 { + 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 { + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { if let pairs = pairs { try encodeMap(pairs) } @@ -135,7 +135,7 @@ extension KeyedEncodingContainerProtocol { extension KeyedDecodingContainerProtocol { - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { var tmpArray = [T]() var nestedContainer = try nestedUnkeyedContainer(forKey: key) @@ -147,8 +147,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil if contains(key) { tmpArray = try decodeArray(T.self, forKey: key) @@ -157,8 +157,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] + 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) { @@ -177,3 +177,5 @@ extension HTTPURLResponse { return Array(200 ..< 300).contains(statusCode) } } + + diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64..08f1ef334d 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -41,7 +41,7 @@ public struct JSONDataEncoding { } public static func encodingParameters(jsonData: Data?) -> [String: Any]? { - var returnedParams: [String: Any]? + var returnedParams: [String: Any]? = nil if let jsonData = jsonData, !jsonData.isEmpty { var params: [String: Any] = [:] params[jsonDataKey] = jsonData diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 02f78ffb47..314f1eff1f 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -9,8 +9,8 @@ import Foundation open class JSONEncodingHelper { - open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { - var params: [String: Any]? + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? = nil // Encode the Encodable object if let encodableObj = encodableObj { @@ -27,7 +27,7 @@ open class JSONEncodingHelper { } open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { - var params: [String: Any]? + var params: [String: Any]? = nil if let encodableObj = encodableObj { do { @@ -41,5 +41,5 @@ open class JSONEncodingHelper { return params } - + } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift index c0542c14c0..11e81ffcc4 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,11 +10,11 @@ protocol JSONEncodable { func encodeToJSON() -> Any } -public enum ErrorResponse: Error { +public enum ErrorResponse : Error { case error(Int, Data?, Error) } -public enum DownloadException: Error { +public enum DownloadException : Error { case responseDataMissing case responseFailed case requestMissing @@ -30,6 +30,7 @@ public enum DecodableRequestBuilderError: Error { case generalError(Error) } + open class Response { public let statusCode: Int public let header: [String: String] @@ -43,7 +44,7 @@ open class Response { public convenience init(response: HTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String: String]() + var header = [String:String]() for (key, value) in rawHeader { if let key = key.base as? String, let value = value as? String { header[key] = value diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index e184d76917..d4e1b3697e 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -7,17 +7,19 @@ 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]]?) { +@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, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case mapString = "map_string" case mapMapString = "map_map_string" } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index 88152934da..f34ba3bb63 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class Animal: NSObject, Codable { + + +@objc public class Animal: NSObject, Codable { public var _className: String public var color: String? = "red" @@ -17,7 +19,7 @@ import Foundation self.color = color } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _className = "className" case color } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift index e09b0e9efd..e7bea63f8e 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -7,4 +7,5 @@ import Foundation + public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index d0fcd43688..d9a7fae214 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class ApiResponse: NSObject, Codable { + + +@objc public class ApiResponse: NSObject, Codable { public var code: Int? public var codeNum: NSNumber? { diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 9e3f3aba24..e57e63b6ed 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class ArrayOfArrayOfNumberOnly: NSObject, Codable { + + +@objc public class ArrayOfArrayOfNumberOnly: NSObject, Codable { public var arrayArrayNumber: [[Double]]? @@ -15,7 +17,7 @@ import Foundation self.arrayArrayNumber = arrayArrayNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayArrayNumber = "ArrayArrayNumber" } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index d287cc1563..e087329fdc 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class ArrayOfNumberOnly: NSObject, Codable { + + +@objc public class ArrayOfNumberOnly: NSObject, Codable { public var arrayNumber: [Double]? @@ -15,7 +17,7 @@ import Foundation self.arrayNumber = arrayNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayNumber = "ArrayNumber" } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index dcc3e9c3dd..c7e6b0b27a 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class ArrayTest: NSObject, Codable { + + +@objc public class ArrayTest: NSObject, Codable { public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? @@ -19,7 +21,7 @@ import Foundation self.arrayArrayOfModel = arrayArrayOfModel } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayOfString = "array_of_string" case arrayArrayOfInteger = "array_array_of_integer" case arrayArrayOfModel = "array_array_of_model" diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index 80a5667445..e472eaaa79 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class Capitalization: NSObject, Codable { + + +@objc public class Capitalization: NSObject, Codable { public var smallCamel: String? public var capitalCamel: String? @@ -26,7 +28,7 @@ import Foundation self.ATT_NAME = ATT_NAME } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case smallCamel case capitalCamel = "CapitalCamel" case smallSnake = "small_Snake" diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 78de5a909f..1b19800ae3 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class Cat: NSObject, Codable { + + +@objc public class Cat: NSObject, Codable { public var _className: String public var color: String? = "red" @@ -24,7 +26,7 @@ import Foundation self.declawed = declawed } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _className = "className" case color case declawed diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index ef8cec45af..8758762c40 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class CatAllOf: NSObject, Codable { + + +@objc public class CatAllOf: NSObject, Codable { public var declawed: Bool? public var declawedNum: NSNumber? { diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index 0610c10c98..df7771efc4 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class Category: NSObject, Codable { + + +@objc public class Category: NSObject, Codable { public var _id: Int64? public var _idNum: NSNumber? { @@ -22,7 +24,7 @@ import Foundation self.name = name } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _id = "id" case name } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 4197ffcaed..c221ccf2a0 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -9,7 +9,7 @@ import Foundation /** Model for testing model with \"_class\" property */ -@objc public class ClassModel: NSObject, Codable { +@objc public class ClassModel: NSObject, Codable { public var _class: String? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 517dbbba2e..5aea86fbb0 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class Client: NSObject, Codable { + + +@objc public class Client: NSObject, Codable { public var client: String? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 37733cd1f3..464f0c7ae4 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class Dog: NSObject, Codable { + + +@objc public class Dog: NSObject, Codable { public var _className: String public var color: String? = "red" @@ -19,7 +21,7 @@ import Foundation self.breed = breed } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _className = "className" case color case breed diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 73fd182272..efcd880f10 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class DogAllOf: NSObject, Codable { + + +@objc public class DogAllOf: NSObject, Codable { public var breed: String? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 034a58c6c0..3c1c261393 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class EnumArrays: NSObject, Codable { + + +@objc public class EnumArrays: NSObject, Codable { public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" @@ -25,7 +27,7 @@ import Foundation self.arrayEnum = arrayEnum } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case justSymbol = "just_symbol" case arrayEnum = "array_enum" } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift index d4029d73f8..c2c639ba32 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -7,6 +7,7 @@ import Foundation + public enum EnumClass: String, Codable, CaseIterable { case abc = "_abc" case efg = "-efg" diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index ce3a030060..60b754914d 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class EnumTest: NSObject, Codable { + + +@objc public class EnumTest: NSObject, Codable { public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" @@ -41,7 +43,7 @@ import Foundation self.outerEnum = outerEnum } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case enumString = "enum_string" case enumStringRequired = "enum_string_required" case enumInteger = "enum_integer" diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift index 7a320c177d..120d5bb787 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -9,7 +9,7 @@ import Foundation /** Must be named `File` for test. */ -@objc public class File: NSObject, Codable { +@objc public class File: NSObject, Codable { /** Test capitalization */ public var sourceURI: String? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index a6437b4fe9..e60109a853 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class FileSchemaTestClass: NSObject, Codable { + + +@objc public class FileSchemaTestClass: NSObject, Codable { public var file: File? public var files: [File]? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index df2c46d375..664481c02f 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class FormatTest: NSObject, Codable { + + +@objc public class FormatTest: NSObject, Codable { public var integer: Int? public var integerNum: NSNumber? { diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index b9f5b39117..974726b3e6 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class HasOnlyReadOnly: NSObject, Codable { + + +@objc public class HasOnlyReadOnly: NSObject, Codable { public var bar: String? public var foo: String? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift index 826dc9e27f..4942b75022 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class List: NSObject, Codable { + + +@objc public class List: NSObject, Codable { public var _123list: String? @@ -15,7 +17,7 @@ import Foundation self._123list = _123list } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _123list = "123-list" } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 2b97660b80..2acd08f46a 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -7,25 +7,27 @@ import Foundation -@objc public class MapTest: NSObject, Codable { + + +@objc public class MapTest: NSObject, Codable { public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" case lower = "lower" } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? + 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?) { + 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, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case mapMapOfString = "map_map_of_string" case mapOfEnumString = "map_of_enum_string" case directMap = "direct_map" diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index e10adad0a7..3ecb79bf9f 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -7,13 +7,15 @@ import Foundation -@objc public class MixedPropertiesAndAdditionalPropertiesClass: NSObject, Codable { + + +@objc public class MixedPropertiesAndAdditionalPropertiesClass: NSObject, Codable { public var uuid: UUID? public var dateTime: Date? - public var map: [String: Animal]? + public var map: [String:Animal]? - public init(uuid: UUID?, dateTime: Date?, 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/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index 1c5410f61d..031badf4be 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -9,7 +9,7 @@ import Foundation /** Model for testing model name starting with number */ -@objc public class Model200Response: NSObject, Codable { +@objc public class Model200Response: NSObject, Codable { public var name: Int? public var nameNum: NSNumber? { @@ -24,7 +24,7 @@ import Foundation self._class = _class } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case name case _class = "class" } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 06f8a2f81a..c863b854d4 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -9,7 +9,7 @@ import Foundation /** Model for testing model name same as property name */ -@objc public class Name: NSObject, Codable { +@objc public class Name: NSObject, Codable { public var name: Int public var snakeCase: Int? @@ -33,7 +33,7 @@ import Foundation self._123number = _123number } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case name case snakeCase = "snake_case" case property diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 3bd9859378..1db3ace430 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class NumberOnly: NSObject, Codable { + + +@objc public class NumberOnly: NSObject, Codable { public var justNumber: Double? @@ -15,7 +17,7 @@ import Foundation self.justNumber = justNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case justNumber = "JustNumber" } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index 586a4c2d55..5fdd493dbe 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class Order: NSObject, Codable { + + +@objc public class Order: NSObject, Codable { public enum Status: String, Codable, CaseIterable { case placed = "placed" @@ -51,7 +53,7 @@ import Foundation self.complete = complete } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _id = "id" case petId case quantity diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index 434111678d..0d1791d3fa 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class OuterComposite: NSObject, Codable { + + +@objc public class OuterComposite: NSObject, Codable { public var myNumber: Double? public var myString: String? @@ -24,7 +26,7 @@ import Foundation self.myBoolean = myBoolean } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case myNumber = "my_number" case myString = "my_string" case myBoolean = "my_boolean" diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift index c3b778cbbe..9e6b8d74e8 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -7,6 +7,7 @@ import Foundation + public enum OuterEnum: String, Codable, CaseIterable { case placed = "placed" case approved = "approved" diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index d84079a2b4..29d4e3d9e3 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class Pet: NSObject, Codable { + + +@objc public class Pet: NSObject, Codable { public enum Status: String, Codable, CaseIterable { case available = "available" @@ -36,7 +38,7 @@ import Foundation self.status = status } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _id = "id" case category case name diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index d1252433b2..2c806ac6d7 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class ReadOnlyFirst: NSObject, Codable { + + +@objc public class ReadOnlyFirst: NSObject, Codable { public var bar: String? public var baz: String? diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index 4b10ac18cf..948f6f4d38 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -9,7 +9,7 @@ import Foundation /** Model for testing reserved words */ -@objc public class Return: NSObject, Codable { +@objc public class Return: NSObject, Codable { public var _return: Int? public var _returnNum: NSNumber? { @@ -22,7 +22,7 @@ import Foundation self._return = _return } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _return = "return" } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index 85e3335253..c01c406599 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class SpecialModelName: NSObject, Codable { + + +@objc public class SpecialModelName: NSObject, Codable { public var specialPropertyName: Int64? public var specialPropertyNameNum: NSNumber? { @@ -20,7 +22,7 @@ import Foundation self.specialPropertyName = specialPropertyName } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case specialPropertyName = "$special[property.name]" } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index ffe9730a6f..3116d99bff 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -7,9 +7,12 @@ import Foundation -@objc public class StringBooleanMap: NSObject, Codable { - public var additionalProperties: [String: Bool] = [:] + +@objc public class StringBooleanMap: NSObject, Codable { + + + public var additionalProperties: [String:Bool] = [:] public subscript(key: String) -> Bool? { get { @@ -42,4 +45,5 @@ import Foundation additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) } + } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 88583be7f5..1bd7489826 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class Tag: NSObject, Codable { + + +@objc public class Tag: NSObject, Codable { public var _id: Int64? public var _idNum: NSNumber? { @@ -22,7 +24,7 @@ import Foundation self.name = name } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _id = "id" case name } diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index 6d51f44540..273b7b31ae 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class TypeHolderDefault: NSObject, Codable { + + +@objc public class TypeHolderDefault: NSObject, Codable { public var stringItem: String = "what" public var numberItem: Double @@ -23,7 +25,7 @@ import Foundation self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 40e3a41c34..3cb1929d43 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class TypeHolderExample: NSObject, Codable { + + +@objc public class TypeHolderExample: NSObject, Codable { public var stringItem: String public var numberItem: Double @@ -23,7 +25,7 @@ import Foundation self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 7dc3cc5954..eb8ec05527 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,7 +7,9 @@ import Foundation -@objc public class User: NSObject, Codable { + + +@objc public class User: NSObject, Codable { public var _id: Int64? public var _idNum: NSNumber? { @@ -40,7 +42,7 @@ import Foundation self.userStatus = userStatus } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _id = "id" case username case firstName diff --git a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 55d0eb4219..22261e2ce9 100644 --- a/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/objcCompatible/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -14,7 +14,7 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { return URLSessionRequestBuilder.self } - func getBuilder() -> RequestBuilder.Type { + func getBuilder() -> RequestBuilder.Type { return URLSessionDecodableRequestBuilder.self } } @@ -23,16 +23,16 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { private var urlSessionStore = SynchronizedDictionary() open class URLSessionRequestBuilder: RequestBuilder { - + private var observation: NSKeyValueObservation? - + deinit { observation?.invalidate() } - + // swiftlint:disable:next weak_delegate fileprivate let sessionDelegate = SessionDelegate() - + /** May be assigned if you want to control the authentication challenges. */ @@ -45,11 +45,11 @@ open class URLSessionRequestBuilder: RequestBuilder { - retry the request. */ public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + + 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 URLSession configuration. @@ -77,40 +77,40 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { - + open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) throws -> URLRequest { + guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL } - + var originalRequest = URLRequest(url: url) - + originalRequest.httpMethod = method.rawValue - + buildHeaders().forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + headers.forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) - + return modifiedRequest } override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { - let urlSessionId: String = UUID().uuidString + let urlSessionId:String = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() urlSessionStore[urlSessionId] = urlSession - + let parameters: [String: Any] = self.parameters ?? [:] - + let fileKeys = parameters.filter { $1 is URL } .map { $0.0 } - + let encoding: ParameterEncoding if fileKeys.count > 0 { encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) @@ -119,29 +119,29 @@ open class URLSessionRequestBuilder: RequestBuilder { } else { encoding = URLEncoding() } - + guard let xMethod = HTTPMethod(rawValue: method) else { fatalError("Unsuported Http method - \(method)") } - + let cleanupRequest = { urlSessionStore[urlSessionId] = nil self.observation?.invalidate() } - + do { let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) - + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in - + guard let self = self else { return } - + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { - + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in - + guard let self = self else { return } - + if shouldRetry { cleanupRequest() self.execute(apiResponseQueue, completion) @@ -157,13 +157,13 @@ open class URLSessionRequestBuilder: RequestBuilder { } } } - + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { onProgressReady?(dataTask.progress) } - + dataTask.resume() - + } catch { apiResponseQueue.async { cleanupRequest() @@ -172,7 +172,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -192,52 +192,52 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is URL.Type: do { - + guard error == nil else { throw DownloadException.responseFailed } - + guard let data = data else { throw DownloadException.responseDataMissing } - + let fileManager = FileManager.default 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: httpResponse.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(.success(Response(response: httpResponse, body: filePath as? T))) - + } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, requestParserError))) } catch let error { completion(.failure(ErrorResponse.error(400, data, error))) } - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + default: - + completion(.success(Response(response: httpResponse, body: data as? T))) } @@ -251,7 +251,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return httpHeaders } - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { guard let contentDisposition = contentDisposition else { return nil @@ -270,7 +270,7 @@ open class URLSessionRequestBuilder: RequestBuilder { filename = contentItem return filename? - .replacingCharacters(in: range, with: "") + .replacingCharacters(in: range, with:"") .replacingOccurrences(of: "\"", with: "") .trimmingCharacters(in: .whitespacesAndNewlines) } @@ -279,7 +279,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getPath(from url: URL) throws -> String { + fileprivate func getPath(from url : URL) throws -> String { guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { throw DownloadException.requestMissingPath @@ -293,7 +293,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { guard let url = urlRequest.url else { throw DownloadException.requestMissingURL @@ -304,7 +304,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } -open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { +open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -324,28 +324,28 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + case is Data.Type: - + completion(.success(Response(response: httpResponse, body: data as? T))) - + default: - + guard let data = data, !data.isEmpty else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) return } - + let decodeResult = CodableHelper.decode(T.self, from: data) - + switch decodeResult { case let .success(decodableObj): completion(.success(Response(response: httpResponse, body: decodableObj))) @@ -356,10 +356,10 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui } } -private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { - +fileprivate class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + var credential: URLCredential? - + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { @@ -402,13 +402,13 @@ public protocol ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest } -private class URLEncoding: ParameterEncoding { - func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { - +fileprivate class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String : Any]?) throws -> URLRequest { + var urlRequest = urlRequest - + guard let parameters = parameters else { return urlRequest } - + guard let url = urlRequest.url else { throw DownloadException.requestMissingURL } @@ -417,12 +417,12 @@ private class URLEncoding: ParameterEncoding { urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) urlRequest.url = urlComponents.url } - + return urlRequest } } -private class FileUploadEncoding: ParameterEncoding { +fileprivate class FileUploadEncoding: ParameterEncoding { let contentTypeForFormPart: (_ fileURL: URL) -> String? @@ -433,13 +433,13 @@ private class FileUploadEncoding: ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { var urlRequest = urlRequest - + guard let parameters = parameters, !parameters.isEmpty else { return urlRequest } - + let boundary = "Boundary-\(UUID().uuidString)" - + urlRequest.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") for (key, value) in parameters { @@ -479,7 +479,7 @@ private class FileUploadEncoding: ParameterEncoding { fatalError("Unprocessable value \(value) with key \(key)") } } - + var body = urlRequest.httpBody.orEmpty body.append("\r\n--\(boundary)--\r\n") @@ -494,7 +494,7 @@ private class FileUploadEncoding: ParameterEncoding { var urlRequest = urlRequest var body = urlRequest.httpBody.orEmpty - + let fileData = try Data(contentsOf: fileURL) let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) @@ -502,7 +502,7 @@ private class FileUploadEncoding: ParameterEncoding { let fileName = fileURL.lastPathComponent // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } @@ -518,20 +518,20 @@ private class FileUploadEncoding: ParameterEncoding { // The value data. body.append(fileData) - + urlRequest.httpBody = body return urlRequest } - + private func configureDataUploadRequest(urlRequest: URLRequest, boundary: String, name: String, data: Data) -> URLRequest { var urlRequest = urlRequest - + var body = urlRequest.httpBody.orEmpty // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } diff --git a/samples/client/petstore/swift5/promisekitLibrary/Package.swift b/samples/client/petstore/swift5/promisekitLibrary/Package.swift index 4445c97949..10dac40538 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/Package.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/Package.swift @@ -14,19 +14,19 @@ let package = Package( // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "PetstoreClient", - targets: ["PetstoreClient"]) + targets: ["PetstoreClient"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.12.0") + .package(url: "https://github.com/mxcl/PromiseKit.git", from: "6.12.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: ["PromiseKit" ], + dependencies: ["PromiseKit", ], path: "PetstoreClient/Classes" - ) + ), ] ) diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 5b09f95571..2404bc8ffc 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -7,7 +7,7 @@ import Foundation public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + 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 @@ -20,17 +20,17 @@ public struct APIHelper { return destination } - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + 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: ",") + if let collection = item.value as? Array { + 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]? { + public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { guard let source = source else { return nil } @@ -46,15 +46,15 @@ public struct APIHelper { } public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { + if let collection = source as? Array { return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") } return source } - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + 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?] { + if let collection = item.value as? Array { collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } @@ -69,3 +69,4 @@ public struct APIHelper { return destination } } + diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift index a5c2d605df..c5d1b9b42d 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,15 +9,15 @@ 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 customHeaders: [String:String] = [:] public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() public static var apiResponseQueue: DispatchQueue = .main } open class RequestBuilder { var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? + var headers: [String:String] + public let parameters: [String:Any]? public let isBody: Bool public let method: String public let URLString: String @@ -25,9 +25,9 @@ open class RequestBuilder { /// Optional block to obtain a reference to the request's progress instance when available. /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. /// If you need to get the request's progress in older OS versions, please use Alamofire http client. - public var onProgressReady: ((Progress) -> Void)? + public var onProgressReady: ((Progress) -> ())? - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters @@ -37,7 +37,7 @@ open class RequestBuilder { addHeaders(PetstoreClientAPI.customHeaders) } - open func addHeaders(_ aHeaders: [String: String]) { + open func addHeaders(_ aHeaders:[String:String]) { for (header, value) in aHeaders { headers[header] = value } @@ -60,5 +60,5 @@ open class RequestBuilder { public protocol RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type } diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index c3a97ff074..ffce4d7c4e 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -8,6 +8,8 @@ import Foundation import PromiseKit + + open class AnotherFakeAPI { /** To test special tags diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 80153ba634..47b6ec5f19 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -8,6 +8,8 @@ import Foundation import PromiseKit + + open class FakeAPI { /** @@ -201,7 +203,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - returns: Promise */ - open class func testBodyWithQueryParams( query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + open class func testBodyWithQueryParams( query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in switch result { @@ -294,7 +296,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> 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(apiResponseQueue) { result -> Void in switch result { @@ -333,7 +335,7 @@ open class FakeAPI { 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?] = [ + let formParams: [String:Any?] = [ "integer": integer?.encodeToJSON(), "int32": int32?.encodeToJSON(), "int64": int64?.encodeToJSON(), @@ -352,7 +354,7 @@ open class FakeAPI { let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -441,7 +443,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() testEnumParametersWithRequestBuilder(enumHeaderStringArray: enumHeaderStringArray, enumHeaderString: enumHeaderString, enumQueryStringArray: enumQueryStringArray, enumQueryString: enumQueryString, enumQueryInteger: enumQueryInteger, enumQueryDouble: enumQueryDouble, enumFormStringArray: enumFormStringArray, enumFormString: enumFormString).execute(apiResponseQueue) { result -> Void in switch result { @@ -471,19 +473,19 @@ open class FakeAPI { 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?] = [ + 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_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), "enum_query_double": enumQueryDouble?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -509,7 +511,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - returns: Promise */ - open class func testGroupParameters( requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + open class func testGroupParameters( requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in switch result { @@ -537,13 +539,13 @@ open class FakeAPI { 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 - + 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(), + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), "int64_group": int64Group?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -564,7 +566,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - returns: Promise */ - open class func testInlineAdditionalProperties( param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + open class func testInlineAdditionalProperties( param: [String:String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in switch result { @@ -583,7 +585,7 @@ open class FakeAPI { - parameter param: (body) request body - returns: RequestBuilder */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> 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) @@ -603,7 +605,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - returns: Promise */ - open class func testJsonFormData( param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + open class func testJsonFormData( param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in switch result { @@ -626,14 +628,14 @@ open class FakeAPI { open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { let path = "/fake/jsonFormData" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + 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() diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index 3a05f8eaf6..e749c654de 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -8,6 +8,8 @@ import Foundation import PromiseKit + + open class FakeClassnameTags123API { /** To test class name in snake case diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 18d3fd1d09..88269c3838 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -8,6 +8,8 @@ import Foundation import PromiseKit + + open class PetAPI { /** Add a new pet to the store @@ -58,7 +60,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - returns: Promise */ - open class func deletePet( petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + open class func deletePet( petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in switch result { @@ -87,8 +89,8 @@ open class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let nillableHeaders: [String: Any?] = [ "api_key": apiKey?.encodeToJSON() @@ -142,8 +144,8 @@ open class PetAPI { open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "status": status.encodeToJSON() @@ -189,8 +191,8 @@ open class PetAPI { open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tags": tags.encodeToJSON() @@ -237,8 +239,8 @@ open class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -296,7 +298,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - returns: Promise */ - open class func updatePetWithForm( petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + open class func updatePetWithForm( petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in switch result { @@ -326,14 +328,14 @@ open class PetAPI { 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?] = [ + 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() @@ -350,7 +352,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - returns: Promise */ - open class func uploadFile( petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + open class func uploadFile( petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in switch result { @@ -380,14 +382,14 @@ open class PetAPI { 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?] = [ + 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() @@ -404,7 +406,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - returns: Promise */ - open class func uploadFileWithRequiredFile( petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + open class func uploadFileWithRequiredFile( petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in switch result { @@ -434,14 +436,14 @@ open class PetAPI { 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?] = [ + 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() diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index 20fc8a1468..9bb66f3699 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -8,6 +8,8 @@ import Foundation import PromiseKit + + open class StoreAPI { /** Delete purchase order by ID @@ -42,8 +44,8 @@ open class StoreAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -57,8 +59,8 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - returns: Promise<[String:Int]> */ - open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<[String: Int]> { - let deferred = Promise<[String: Int]>.pending() + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise<[String:Int]> { + let deferred = Promise<[String:Int]>.pending() getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -79,14 +81,14 @@ open class StoreAPI { - name: api_key - returns: RequestBuilder<[String:Int]> */ - open class func getInventoryWithRequestBuilder() -> 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + let requestBuilder: RequestBuilder<[String:Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } @@ -124,8 +126,8 @@ open class StoreAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index 89c48c3b28..237961c96a 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -8,6 +8,8 @@ import Foundation import PromiseKit + + open class UserAPI { /** Create user @@ -157,8 +159,8 @@ open class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -198,8 +200,8 @@ open class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -215,7 +217,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - returns: Promise */ - open class func loginUser( username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + open class func loginUser( username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in switch result { @@ -239,11 +241,11 @@ open class UserAPI { open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), + "username": username.encodeToJSON(), "password": password.encodeToJSON() ]) @@ -279,8 +281,8 @@ open class UserAPI { open class func logoutUserWithRequestBuilder() -> RequestBuilder { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -296,7 +298,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - returns: Promise */ - open class func updateUser( username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { + open class func updateUser( username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Promise { let deferred = Promise.pending() updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in switch result { diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift index ef971ebadc..01b28a4bd4 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -45,4 +45,4 @@ open class CodableHelper { open class func encode(_ value: T) -> Swift.Result where T: Encodable { return Swift.Result { try self.jsonEncoder.encode(value) } } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift index 627d9adb75..f171525e43 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -7,10 +7,10 @@ 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. @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} + +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 736702ea5d..5b98ba2967 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -109,24 +109,24 @@ extension String: CodingKey { extension KeyedEncodingContainerProtocol { - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + 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 { + 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 { + 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 { + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { if let pairs = pairs { try encodeMap(pairs) } @@ -136,7 +136,7 @@ extension KeyedEncodingContainerProtocol { extension KeyedDecodingContainerProtocol { - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { var tmpArray = [T]() var nestedContainer = try nestedUnkeyedContainer(forKey: key) @@ -148,8 +148,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil if contains(key) { tmpArray = try decodeArray(T.self, forKey: key) @@ -158,8 +158,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] + 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) { @@ -180,7 +180,7 @@ extension HTTPURLResponse { } extension RequestBuilder { - public func execute() -> Promise> { + public func execute() -> Promise> { let deferred = Promise>.pending() self.execute { result in switch result { diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64..08f1ef334d 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -41,7 +41,7 @@ public struct JSONDataEncoding { } public static func encodingParameters(jsonData: Data?) -> [String: Any]? { - var returnedParams: [String: Any]? + var returnedParams: [String: Any]? = nil if let jsonData = jsonData, !jsonData.isEmpty { var params: [String: Any] = [:] params[jsonDataKey] = jsonData diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 02f78ffb47..314f1eff1f 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -9,8 +9,8 @@ import Foundation open class JSONEncodingHelper { - open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { - var params: [String: Any]? + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? = nil // Encode the Encodable object if let encodableObj = encodableObj { @@ -27,7 +27,7 @@ open class JSONEncodingHelper { } open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { - var params: [String: Any]? + var params: [String: Any]? = nil if let encodableObj = encodableObj { do { @@ -41,5 +41,5 @@ open class JSONEncodingHelper { return params } - + } diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift index c0542c14c0..11e81ffcc4 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,11 +10,11 @@ protocol JSONEncodable { func encodeToJSON() -> Any } -public enum ErrorResponse: Error { +public enum ErrorResponse : Error { case error(Int, Data?, Error) } -public enum DownloadException: Error { +public enum DownloadException : Error { case responseDataMissing case responseFailed case requestMissing @@ -30,6 +30,7 @@ public enum DecodableRequestBuilderError: Error { case generalError(Error) } + open class Response { public let statusCode: Int public let header: [String: String] @@ -43,7 +44,7 @@ open class Response { public convenience init(response: HTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String: String]() + var header = [String:String]() for (key, value) in rawHeader { if let key = key.base as? String, let value = value as? String { header[key] = value diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 1af0315359..28ca8377b8 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -7,17 +7,19 @@ import Foundation -public struct AdditionalPropertiesClass: Codable { - public var mapString: [String: String]? - public var mapMapString: [String: [String: String]]? +public struct AdditionalPropertiesClass: Codable { - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + + 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, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case mapString = "map_string" case mapMapString = "map_map_string" } diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index 5ed9f31e2a..1050d79dbe 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -7,7 +7,9 @@ import Foundation -public struct Animal: Codable { + +public struct Animal: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift index e09b0e9efd..e7bea63f8e 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -7,4 +7,5 @@ import Foundation + public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index ec270da890..4d0393b9ba 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -7,7 +7,9 @@ import Foundation -public struct ApiResponse: Codable { + +public struct ApiResponse: Codable { + public var code: Int? public var type: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 6c252ed475..1363c96394 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayOfArrayOfNumberOnly: Codable { + +public struct ArrayOfArrayOfNumberOnly: Codable { + public var arrayArrayNumber: [[Double]]? @@ -15,7 +17,7 @@ public struct ArrayOfArrayOfNumberOnly: Codable { self.arrayArrayNumber = arrayArrayNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayArrayNumber = "ArrayArrayNumber" } diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index e84eb5d650..6b8873730c 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayOfNumberOnly: Codable { + +public struct ArrayOfNumberOnly: Codable { + public var arrayNumber: [Double]? @@ -15,7 +17,7 @@ public struct ArrayOfNumberOnly: Codable { self.arrayNumber = arrayNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayNumber = "ArrayNumber" } diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index d2140933d1..64f7c6d9db 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayTest: Codable { + +public struct ArrayTest: Codable { + public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? @@ -19,7 +21,7 @@ public struct ArrayTest: Codable { self.arrayArrayOfModel = arrayArrayOfModel } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayOfString = "array_of_string" case arrayArrayOfInteger = "array_array_of_integer" case arrayArrayOfModel = "array_array_of_model" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index d1b3b27616..ddb669a590 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -7,7 +7,9 @@ import Foundation -public struct Capitalization: Codable { + +public struct Capitalization: Codable { + public var smallCamel: String? public var capitalCamel: String? @@ -26,7 +28,7 @@ public struct Capitalization: Codable { self.ATT_NAME = ATT_NAME } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case smallCamel case capitalCamel = "CapitalCamel" case smallSnake = "small_Snake" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 7ab887f311..c4f6e0d488 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -7,7 +7,9 @@ import Foundation -public struct Cat: Codable { + +public struct Cat: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index a51ad0dffa..7b1d7e32be 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -7,7 +7,9 @@ import Foundation -public struct CatAllOf: Codable { + +public struct CatAllOf: Codable { + public var declawed: Bool? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index eb8f7e5e19..3ec00f5ab1 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,7 +7,9 @@ import Foundation -public struct Category: Codable { + +public struct Category: Codable { + public var id: Int64? public var name: String = "default-name" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index e2a7d4427a..af030c3dd6 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable { +public struct ClassModel: Codable { + public var _class: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 00245ca372..0aae748c76 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -7,7 +7,9 @@ import Foundation -public struct Client: Codable { + +public struct Client: Codable { + public var client: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 492c122800..198e28b94d 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -7,7 +7,9 @@ import Foundation -public struct Dog: Codable { + +public struct Dog: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 7786f8acc5..8ff49b2af2 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -7,7 +7,9 @@ import Foundation -public struct DogAllOf: Codable { + +public struct DogAllOf: Codable { + public var breed: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 9844e7c40e..e2d3fa04f9 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -7,7 +7,9 @@ import Foundation -public struct EnumArrays: Codable { + +public struct EnumArrays: Codable { + public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" @@ -25,7 +27,7 @@ public struct EnumArrays: Codable { self.arrayEnum = arrayEnum } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case justSymbol = "just_symbol" case arrayEnum = "array_enum" } diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift index d4029d73f8..c2c639ba32 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -7,6 +7,7 @@ import Foundation + public enum EnumClass: String, Codable, CaseIterable { case abc = "_abc" case efg = "-efg" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 789f583e1d..a56e1f3638 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct EnumTest: Codable { + +public struct EnumTest: Codable { + public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" @@ -41,7 +43,7 @@ public struct EnumTest: Codable { self.outerEnum = outerEnum } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case enumString = "enum_string" case enumStringRequired = "enum_string_required" case enumInteger = "enum_integer" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift index abf3ccffc4..773b53b2cb 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -8,7 +8,8 @@ import Foundation /** Must be named `File` for test. */ -public struct File: Codable { +public struct File: Codable { + /** Test capitalization */ public var sourceURI: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 532f145793..83dc1148cf 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -7,7 +7,9 @@ import Foundation -public struct FileSchemaTestClass: Codable { + +public struct FileSchemaTestClass: Codable { + public var file: File? public var files: [File]? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 20bd6d103b..bccd3f9fb1 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct FormatTest: Codable { + +public struct FormatTest: Codable { + public var integer: Int? public var int32: Int? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 906ddb06fb..566d71a35e 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct HasOnlyReadOnly: Codable { + +public struct HasOnlyReadOnly: Codable { + public var bar: String? public var foo: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift index fe13d302cc..80cecab242 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -7,7 +7,9 @@ import Foundation -public struct List: Codable { + +public struct List: Codable { + public var _123list: String? @@ -15,7 +17,7 @@ public struct List: Codable { self._123list = _123list } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _123list = "123-list" } diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 4b6037f378..f0c02de95f 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -7,25 +7,27 @@ import Foundation -public struct MapTest: Codable { + +public struct MapTest: Codable { + public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" case lower = "lower" } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? + 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?) { + 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, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case mapMapOfString = "map_map_of_string" case mapOfEnumString = "map_of_enum_string" case directMap = "direct_map" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c3deb2f289..710e62a9b5 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -7,13 +7,15 @@ import Foundation -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + public var uuid: UUID? public var dateTime: Date? - public var map: [String: Animal]? + public var map: [String:Animal]? - public init(uuid: UUID?, dateTime: Date?, 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/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index b61db7d6e7..450a53b918 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model name starting with number */ -public struct Model200Response: Codable { +public struct Model200Response: Codable { + public var name: Int? public var _class: String? @@ -18,7 +19,7 @@ public struct Model200Response: Codable { self._class = _class } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case name case _class = "class" } diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 8ab4db44b7..6deb69fcd7 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model name same as property name */ -public struct Name: Codable { +public struct Name: Codable { + public var name: Int public var snakeCase: Int? @@ -22,7 +23,7 @@ public struct Name: Codable { self._123number = _123number } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case name case snakeCase = "snake_case" case property diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 4d1dafcc2c..0c9ee2b7b9 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct NumberOnly: Codable { + +public struct NumberOnly: Codable { + public var justNumber: Double? @@ -15,7 +17,7 @@ public struct NumberOnly: Codable { self.justNumber = justNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case justNumber = "JustNumber" } diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index 40c30cc860..ab0eac0b30 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,7 +7,9 @@ import Foundation -public struct Order: Codable { + +public struct Order: Codable { + public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index 18c3a024f1..4a7d227104 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -7,7 +7,9 @@ import Foundation -public struct OuterComposite: Codable { + +public struct OuterComposite: Codable { + public var myNumber: Double? public var myString: String? @@ -19,7 +21,7 @@ public struct OuterComposite: Codable { self.myBoolean = myBoolean } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case myNumber = "my_number" case myString = "my_string" case myBoolean = "my_boolean" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift index c3b778cbbe..9e6b8d74e8 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -7,6 +7,7 @@ import Foundation + public enum OuterEnum: String, Codable, CaseIterable { case placed = "placed" case approved = "approved" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index b9ce0e9332..a973071d6c 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,7 +7,9 @@ import Foundation -public struct Pet: Codable { + +public struct Pet: Codable { + public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 0acd21fd10..b2a6b7e2b8 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -7,7 +7,9 @@ import Foundation -public struct ReadOnlyFirst: Codable { + +public struct ReadOnlyFirst: Codable { + public var bar: String? public var baz: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index c223f993a6..7e089dcee2 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing reserved words */ -public struct Return: Codable { +public struct Return: Codable { + public var _return: Int? @@ -16,7 +17,7 @@ public struct Return: Codable { self._return = _return } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _return = "return" } diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index 6e8650f76d..e890ef9525 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -7,7 +7,9 @@ import Foundation -public struct SpecialModelName: Codable { + +public struct SpecialModelName: Codable { + public var specialPropertyName: Int64? @@ -15,7 +17,7 @@ public struct SpecialModelName: Codable { self.specialPropertyName = specialPropertyName } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case specialPropertyName = "$special[property.name]" } diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 3f1237fee4..f65ae0623d 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -7,9 +7,12 @@ import Foundation -public struct StringBooleanMap: Codable { - public var additionalProperties: [String: Bool] = [:] +public struct StringBooleanMap: Codable { + + + + public var additionalProperties: [String:Bool] = [:] public subscript(key: String) -> Bool? { get { @@ -42,4 +45,5 @@ public struct StringBooleanMap: Codable { additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) } + } diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 4dd8a9a9f5..a91b6061bc 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,7 +7,9 @@ import Foundation -public struct Tag: Codable { + +public struct Tag: Codable { + public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index a9e088808e..2d377c3edb 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -7,7 +7,9 @@ import Foundation -public struct TypeHolderDefault: Codable { + +public struct TypeHolderDefault: Codable { + public var stringItem: String = "what" public var numberItem: Double @@ -23,7 +25,7 @@ public struct TypeHolderDefault: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index dff4083ae4..e5eb92da69 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -7,7 +7,9 @@ import Foundation -public struct TypeHolderExample: Codable { + +public struct TypeHolderExample: Codable { + public var stringItem: String public var numberItem: Double @@ -23,7 +25,7 @@ public struct TypeHolderExample: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 79f271ed73..f70328ca9e 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,7 +7,9 @@ import Foundation -public struct User: Codable { + +public struct User: Codable { + public var id: Int64? public var username: String? diff --git a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 55d0eb4219..22261e2ce9 100644 --- a/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/promisekitLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -14,7 +14,7 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { return URLSessionRequestBuilder.self } - func getBuilder() -> RequestBuilder.Type { + func getBuilder() -> RequestBuilder.Type { return URLSessionDecodableRequestBuilder.self } } @@ -23,16 +23,16 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { private var urlSessionStore = SynchronizedDictionary() open class URLSessionRequestBuilder: RequestBuilder { - + private var observation: NSKeyValueObservation? - + deinit { observation?.invalidate() } - + // swiftlint:disable:next weak_delegate fileprivate let sessionDelegate = SessionDelegate() - + /** May be assigned if you want to control the authentication challenges. */ @@ -45,11 +45,11 @@ open class URLSessionRequestBuilder: RequestBuilder { - retry the request. */ public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + + 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 URLSession configuration. @@ -77,40 +77,40 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { - + open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) throws -> URLRequest { + guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL } - + var originalRequest = URLRequest(url: url) - + originalRequest.httpMethod = method.rawValue - + buildHeaders().forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + headers.forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) - + return modifiedRequest } override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { - let urlSessionId: String = UUID().uuidString + let urlSessionId:String = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() urlSessionStore[urlSessionId] = urlSession - + let parameters: [String: Any] = self.parameters ?? [:] - + let fileKeys = parameters.filter { $1 is URL } .map { $0.0 } - + let encoding: ParameterEncoding if fileKeys.count > 0 { encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) @@ -119,29 +119,29 @@ open class URLSessionRequestBuilder: RequestBuilder { } else { encoding = URLEncoding() } - + guard let xMethod = HTTPMethod(rawValue: method) else { fatalError("Unsuported Http method - \(method)") } - + let cleanupRequest = { urlSessionStore[urlSessionId] = nil self.observation?.invalidate() } - + do { let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) - + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in - + guard let self = self else { return } - + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { - + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in - + guard let self = self else { return } - + if shouldRetry { cleanupRequest() self.execute(apiResponseQueue, completion) @@ -157,13 +157,13 @@ open class URLSessionRequestBuilder: RequestBuilder { } } } - + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { onProgressReady?(dataTask.progress) } - + dataTask.resume() - + } catch { apiResponseQueue.async { cleanupRequest() @@ -172,7 +172,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -192,52 +192,52 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is URL.Type: do { - + guard error == nil else { throw DownloadException.responseFailed } - + guard let data = data else { throw DownloadException.responseDataMissing } - + let fileManager = FileManager.default 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: httpResponse.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(.success(Response(response: httpResponse, body: filePath as? T))) - + } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, requestParserError))) } catch let error { completion(.failure(ErrorResponse.error(400, data, error))) } - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + default: - + completion(.success(Response(response: httpResponse, body: data as? T))) } @@ -251,7 +251,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return httpHeaders } - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { guard let contentDisposition = contentDisposition else { return nil @@ -270,7 +270,7 @@ open class URLSessionRequestBuilder: RequestBuilder { filename = contentItem return filename? - .replacingCharacters(in: range, with: "") + .replacingCharacters(in: range, with:"") .replacingOccurrences(of: "\"", with: "") .trimmingCharacters(in: .whitespacesAndNewlines) } @@ -279,7 +279,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getPath(from url: URL) throws -> String { + fileprivate func getPath(from url : URL) throws -> String { guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { throw DownloadException.requestMissingPath @@ -293,7 +293,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { guard let url = urlRequest.url else { throw DownloadException.requestMissingURL @@ -304,7 +304,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } -open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { +open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -324,28 +324,28 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + case is Data.Type: - + completion(.success(Response(response: httpResponse, body: data as? T))) - + default: - + guard let data = data, !data.isEmpty else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) return } - + let decodeResult = CodableHelper.decode(T.self, from: data) - + switch decodeResult { case let .success(decodableObj): completion(.success(Response(response: httpResponse, body: decodableObj))) @@ -356,10 +356,10 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui } } -private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { - +fileprivate class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + var credential: URLCredential? - + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { @@ -402,13 +402,13 @@ public protocol ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest } -private class URLEncoding: ParameterEncoding { - func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { - +fileprivate class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String : Any]?) throws -> URLRequest { + var urlRequest = urlRequest - + guard let parameters = parameters else { return urlRequest } - + guard let url = urlRequest.url else { throw DownloadException.requestMissingURL } @@ -417,12 +417,12 @@ private class URLEncoding: ParameterEncoding { urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) urlRequest.url = urlComponents.url } - + return urlRequest } } -private class FileUploadEncoding: ParameterEncoding { +fileprivate class FileUploadEncoding: ParameterEncoding { let contentTypeForFormPart: (_ fileURL: URL) -> String? @@ -433,13 +433,13 @@ private class FileUploadEncoding: ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { var urlRequest = urlRequest - + guard let parameters = parameters, !parameters.isEmpty else { return urlRequest } - + let boundary = "Boundary-\(UUID().uuidString)" - + urlRequest.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") for (key, value) in parameters { @@ -479,7 +479,7 @@ private class FileUploadEncoding: ParameterEncoding { fatalError("Unprocessable value \(value) with key \(key)") } } - + var body = urlRequest.httpBody.orEmpty body.append("\r\n--\(boundary)--\r\n") @@ -494,7 +494,7 @@ private class FileUploadEncoding: ParameterEncoding { var urlRequest = urlRequest var body = urlRequest.httpBody.orEmpty - + let fileData = try Data(contentsOf: fileURL) let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) @@ -502,7 +502,7 @@ private class FileUploadEncoding: ParameterEncoding { let fileName = fileURL.lastPathComponent // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } @@ -518,20 +518,20 @@ private class FileUploadEncoding: ParameterEncoding { // The value data. body.append(fileData) - + urlRequest.httpBody = body return urlRequest } - + private func configureDataUploadRequest(urlRequest: URLRequest, boundary: String, name: String, data: Data) -> URLRequest { var urlRequest = urlRequest - + var body = urlRequest.httpBody.orEmpty // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } diff --git a/samples/client/petstore/swift5/readonlyProperties/Package.swift b/samples/client/petstore/swift5/readonlyProperties/Package.swift index 96dfff54ed..79f6f81887 100644 --- a/samples/client/petstore/swift5/readonlyProperties/Package.swift +++ b/samples/client/petstore/swift5/readonlyProperties/Package.swift @@ -14,7 +14,7 @@ let package = Package( // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "PetstoreClient", - targets: ["PetstoreClient"]) + targets: ["PetstoreClient"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. @@ -26,6 +26,6 @@ let package = Package( name: "PetstoreClient", dependencies: [], path: "PetstoreClient/Classes" - ) + ), ] ) diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 5b09f95571..2404bc8ffc 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -7,7 +7,7 @@ import Foundation public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + 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 @@ -20,17 +20,17 @@ public struct APIHelper { return destination } - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + 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: ",") + if let collection = item.value as? Array { + 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]? { + public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { guard let source = source else { return nil } @@ -46,15 +46,15 @@ public struct APIHelper { } public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { + if let collection = source as? Array { return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") } return source } - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + 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?] { + if let collection = item.value as? Array { collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } @@ -69,3 +69,4 @@ public struct APIHelper { return destination } } + diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs.swift index a5c2d605df..c5d1b9b42d 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,15 +9,15 @@ 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 customHeaders: [String:String] = [:] public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() public static var apiResponseQueue: DispatchQueue = .main } open class RequestBuilder { var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? + var headers: [String:String] + public let parameters: [String:Any]? public let isBody: Bool public let method: String public let URLString: String @@ -25,9 +25,9 @@ open class RequestBuilder { /// Optional block to obtain a reference to the request's progress instance when available. /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. /// If you need to get the request's progress in older OS versions, please use Alamofire http client. - public var onProgressReady: ((Progress) -> Void)? + public var onProgressReady: ((Progress) -> ())? - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters @@ -37,7 +37,7 @@ open class RequestBuilder { addHeaders(PetstoreClientAPI.customHeaders) } - open func addHeaders(_ aHeaders: [String: String]) { + open func addHeaders(_ aHeaders:[String:String]) { for (header, value) in aHeaders { headers[header] = value } @@ -60,5 +60,5 @@ open class RequestBuilder { public protocol RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type } diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 5bbf323f82..bb3ae71782 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class AnotherFakeAPI { /** To test special tags @@ -15,7 +17,7 @@ open class AnotherFakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 134d6aea41..d1d81faa33 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class FakeAPI { /** @@ -14,7 +16,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { + open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?,_ error: Error?) -> Void)) { fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -49,7 +51,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?,_ error: Error?) -> Void)) { fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -84,7 +86,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { + open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?,_ error: Error?) -> Void)) { fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -119,7 +121,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -154,7 +156,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -190,7 +192,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -229,7 +231,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -279,7 +281,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, 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(apiResponseQueue) { result -> Void in switch result { case .success: @@ -316,7 +318,7 @@ open class FakeAPI { 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?] = [ + let formParams: [String:Any?] = [ "integer": integer?.encodeToJSON(), "int32": int32?.encodeToJSON(), "int64": int64?.encodeToJSON(), @@ -335,7 +337,7 @@ open class FakeAPI { let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -424,7 +426,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, 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(apiResponseQueue) { result -> Void in switch result { case .success: @@ -452,19 +454,19 @@ open class FakeAPI { 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?] = [ + 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_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), "enum_query_double": enumQueryDouble?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -490,7 +492,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -516,13 +518,13 @@ open class FakeAPI { 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 - + 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(), + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), "int64_group": int64Group?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -543,7 +545,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testInlineAdditionalProperties(param: [String:String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -560,7 +562,7 @@ open class FakeAPI { - parameter param: (body) request body - returns: RequestBuilder */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> 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) @@ -580,7 +582,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -601,14 +603,14 @@ open class FakeAPI { open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { let path = "/fake/jsonFormData" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + 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() diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index 48cfe7187b..d21c4a49d4 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -7,6 +7,8 @@ import Foundation + + open class FakeClassnameTags123API { /** To test class name in snake case @@ -15,7 +17,7 @@ open class FakeClassnameTags123API { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index c938db7200..f5366f5832 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class PetAPI { /** Add a new pet to the store @@ -15,7 +17,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -55,7 +57,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -82,8 +84,8 @@ open class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let nillableHeaders: [String: Any?] = [ "api_key": apiKey?.encodeToJSON() @@ -111,7 +113,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -135,8 +137,8 @@ open class PetAPI { open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "status": status.encodeToJSON() @@ -155,7 +157,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ @available(*, deprecated, message: "This operation is deprecated.") - open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -180,8 +182,8 @@ open class PetAPI { open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tags": tags.encodeToJSON() @@ -199,7 +201,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { + open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?,_ error: Error?) -> Void)) { getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -226,8 +228,8 @@ open class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -242,7 +244,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -283,7 +285,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -311,14 +313,14 @@ open class PetAPI { 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?] = [ + 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() @@ -335,7 +337,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -363,14 +365,14 @@ open class PetAPI { 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?] = [ + 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() @@ -387,7 +389,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -415,14 +417,14 @@ open class PetAPI { 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?] = [ + 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() diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index a8a83eda39..3848eda85a 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class StoreAPI { /** Delete purchase order by ID @@ -15,7 +17,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -39,8 +41,8 @@ open class StoreAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -54,7 +56,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String:Int]?,_ error: Error?) -> Void)) { getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -74,14 +76,14 @@ open class StoreAPI { - name: api_key - returns: RequestBuilder<[String:Int]> */ - open class func getInventoryWithRequestBuilder() -> 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + let requestBuilder: RequestBuilder<[String:Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } @@ -93,7 +95,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -117,8 +119,8 @@ open class StoreAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -133,7 +135,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index 505ed1b0c5..546166841d 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class UserAPI { /** Create user @@ -15,7 +17,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -52,7 +54,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -88,7 +90,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -124,7 +126,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -148,8 +150,8 @@ open class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -164,7 +166,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { + open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?,_ error: Error?) -> Void)) { getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -187,8 +189,8 @@ open class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -204,7 +206,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -226,11 +228,11 @@ open class UserAPI { open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), + "username": username.encodeToJSON(), "password": password.encodeToJSON() ]) @@ -245,7 +247,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -264,8 +266,8 @@ open class UserAPI { open class func logoutUserWithRequestBuilder() -> RequestBuilder { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -281,7 +283,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift index ef971ebadc..01b28a4bd4 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -45,4 +45,4 @@ open class CodableHelper { open class func encode(_ value: T) -> Swift.Result where T: Encodable { return Swift.Result { try self.jsonEncoder.encode(value) } } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Configuration.swift index 627d9adb75..f171525e43 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -7,10 +7,10 @@ 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. @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} + +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 93ed6b90b3..6e279679c6 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -108,24 +108,24 @@ extension String: CodingKey { extension KeyedEncodingContainerProtocol { - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + 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 { + 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 { + 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 { + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { if let pairs = pairs { try encodeMap(pairs) } @@ -135,7 +135,7 @@ extension KeyedEncodingContainerProtocol { extension KeyedDecodingContainerProtocol { - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { var tmpArray = [T]() var nestedContainer = try nestedUnkeyedContainer(forKey: key) @@ -147,8 +147,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil if contains(key) { tmpArray = try decodeArray(T.self, forKey: key) @@ -157,8 +157,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] + 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) { @@ -177,3 +177,5 @@ extension HTTPURLResponse { return Array(200 ..< 300).contains(statusCode) } } + + diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64..08f1ef334d 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -41,7 +41,7 @@ public struct JSONDataEncoding { } public static func encodingParameters(jsonData: Data?) -> [String: Any]? { - var returnedParams: [String: Any]? + var returnedParams: [String: Any]? = nil if let jsonData = jsonData, !jsonData.isEmpty { var params: [String: Any] = [:] params[jsonDataKey] = jsonData diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 02f78ffb47..314f1eff1f 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -9,8 +9,8 @@ import Foundation open class JSONEncodingHelper { - open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { - var params: [String: Any]? + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? = nil // Encode the Encodable object if let encodableObj = encodableObj { @@ -27,7 +27,7 @@ open class JSONEncodingHelper { } open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { - var params: [String: Any]? + var params: [String: Any]? = nil if let encodableObj = encodableObj { do { @@ -41,5 +41,5 @@ open class JSONEncodingHelper { return params } - + } diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models.swift index c0542c14c0..11e81ffcc4 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,11 +10,11 @@ protocol JSONEncodable { func encodeToJSON() -> Any } -public enum ErrorResponse: Error { +public enum ErrorResponse : Error { case error(Int, Data?, Error) } -public enum DownloadException: Error { +public enum DownloadException : Error { case responseDataMissing case responseFailed case requestMissing @@ -30,6 +30,7 @@ public enum DecodableRequestBuilderError: Error { case generalError(Error) } + open class Response { public let statusCode: Int public let header: [String: String] @@ -43,7 +44,7 @@ open class Response { public convenience init(response: HTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String: String]() + var header = [String:String]() for (key, value) in rawHeader { if let key = key.base as? String, let value = value as? String { header[key] = value diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 3fda7052a7..341b729479 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -7,17 +7,19 @@ import Foundation -public struct AdditionalPropertiesClass: Codable { - public private(set) var mapString: [String: String]? - public private(set) var mapMapString: [String: [String: String]]? +public struct AdditionalPropertiesClass: Codable { - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + + public private(set) var mapString: [String:String]? + public private(set) 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, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case mapString = "map_string" case mapMapString = "map_map_string" } diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index af59c2a9ef..fc8bdfae7d 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -7,7 +7,9 @@ import Foundation -public struct Animal: Codable { + +public struct Animal: Codable { + public private(set) var className: String public private(set) var color: String? = "red" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift index e09b0e9efd..e7bea63f8e 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -7,4 +7,5 @@ import Foundation + public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index a89768595c..48e052b380 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -7,7 +7,9 @@ import Foundation -public struct ApiResponse: Codable { + +public struct ApiResponse: Codable { + public private(set) var code: Int? public private(set) var type: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index a2593b7c1a..08f1b7e89b 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayOfArrayOfNumberOnly: Codable { + +public struct ArrayOfArrayOfNumberOnly: Codable { + public private(set) var arrayArrayNumber: [[Double]]? @@ -15,7 +17,7 @@ public struct ArrayOfArrayOfNumberOnly: Codable { self.arrayArrayNumber = arrayArrayNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayArrayNumber = "ArrayArrayNumber" } diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index c5edf11005..579f65acb9 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayOfNumberOnly: Codable { + +public struct ArrayOfNumberOnly: Codable { + public private(set) var arrayNumber: [Double]? @@ -15,7 +17,7 @@ public struct ArrayOfNumberOnly: Codable { self.arrayNumber = arrayNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayNumber = "ArrayNumber" } diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index 8ad39b8c09..8fdf0a2869 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayTest: Codable { + +public struct ArrayTest: Codable { + public private(set) var arrayOfString: [String]? public private(set) var arrayArrayOfInteger: [[Int64]]? @@ -19,7 +21,7 @@ public struct ArrayTest: Codable { self.arrayArrayOfModel = arrayArrayOfModel } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayOfString = "array_of_string" case arrayArrayOfInteger = "array_array_of_integer" case arrayArrayOfModel = "array_array_of_model" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index eb3d6777e5..f4c7a90c3a 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -7,7 +7,9 @@ import Foundation -public struct Capitalization: Codable { + +public struct Capitalization: Codable { + public private(set) var smallCamel: String? public private(set) var capitalCamel: String? @@ -26,7 +28,7 @@ public struct Capitalization: Codable { self.ATT_NAME = ATT_NAME } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case smallCamel case capitalCamel = "CapitalCamel" case smallSnake = "small_Snake" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 2978b016f9..3e509835b0 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -7,7 +7,9 @@ import Foundation -public struct Cat: Codable { + +public struct Cat: Codable { + public private(set) var className: String public private(set) var color: String? = "red" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index 4ab80fbcd9..f1627ee097 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -7,7 +7,9 @@ import Foundation -public struct CatAllOf: Codable { + +public struct CatAllOf: Codable { + public private(set) var declawed: Bool? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index 3482703a6b..bce83565ca 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,7 +7,9 @@ import Foundation -public struct Category: Codable { + +public struct Category: Codable { + public private(set) var id: Int64? public private(set) var name: String = "default-name" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index 319d88a70f..1d6271aef8 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable { +public struct ClassModel: Codable { + public private(set) var _class: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 5dd8cc3062..1e06ac7327 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -7,7 +7,9 @@ import Foundation -public struct Client: Codable { + +public struct Client: Codable { + public private(set) var client: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 16ab196b87..fde6641dd7 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -7,7 +7,9 @@ import Foundation -public struct Dog: Codable { + +public struct Dog: Codable { + public private(set) var className: String public private(set) var color: String? = "red" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index d8a838725c..26d6da9def 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -7,7 +7,9 @@ import Foundation -public struct DogAllOf: Codable { + +public struct DogAllOf: Codable { + public private(set) var breed: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index d9ce69e9fc..faa0ba8afb 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -7,7 +7,9 @@ import Foundation -public struct EnumArrays: Codable { + +public struct EnumArrays: Codable { + public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" @@ -25,7 +27,7 @@ public struct EnumArrays: Codable { self.arrayEnum = arrayEnum } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case justSymbol = "just_symbol" case arrayEnum = "array_enum" } diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift index d4029d73f8..c2c639ba32 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -7,6 +7,7 @@ import Foundation + public enum EnumClass: String, Codable, CaseIterable { case abc = "_abc" case efg = "-efg" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 2b114d422d..576278be14 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct EnumTest: Codable { + +public struct EnumTest: Codable { + public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" @@ -41,7 +43,7 @@ public struct EnumTest: Codable { self.outerEnum = outerEnum } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case enumString = "enum_string" case enumStringRequired = "enum_string_required" case enumInteger = "enum_integer" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/File.swift index eeab581944..81dac248ed 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -8,7 +8,8 @@ import Foundation /** Must be named `File` for test. */ -public struct File: Codable { +public struct File: Codable { + /** Test capitalization */ public private(set) var sourceURI: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 94574ca995..4be9d64d2f 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -7,7 +7,9 @@ import Foundation -public struct FileSchemaTestClass: Codable { + +public struct FileSchemaTestClass: Codable { + public private(set) var file: File? public private(set) var files: [File]? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 57bbd464b5..152b1b6277 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct FormatTest: Codable { + +public struct FormatTest: Codable { + public private(set) var integer: Int? public private(set) var int32: Int? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 4de261f092..78b1469786 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct HasOnlyReadOnly: Codable { + +public struct HasOnlyReadOnly: Codable { + public private(set) var bar: String? public private(set) var foo: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/List.swift index 135160ff8d..50e66b8c19 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -7,7 +7,9 @@ import Foundation -public struct List: Codable { + +public struct List: Codable { + public private(set) var _123list: String? @@ -15,7 +17,7 @@ public struct List: Codable { self._123list = _123list } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _123list = "123-list" } diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index ebd9dd5b5b..2df0bccb30 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -7,25 +7,27 @@ import Foundation -public struct MapTest: Codable { + +public struct MapTest: Codable { + public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" case lower = "lower" } - public private(set) var mapMapOfString: [String: [String: String]]? - public private(set) var mapOfEnumString: [String: String]? - public private(set) var directMap: [String: Bool]? + public private(set) var mapMapOfString: [String:[String:String]]? + public private(set) var mapOfEnumString: [String:String]? + public private(set) var directMap: [String:Bool]? public private(set) var indirectMap: StringBooleanMap? - public init(mapMapOfString: [String: [String: String]]?, mapOfEnumString: [String: String]?, directMap: [String: Bool]?, 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, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case mapMapOfString = "map_map_of_string" case mapOfEnumString = "map_of_enum_string" case directMap = "direct_map" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index dc1ee0461b..c8cac41d37 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -7,13 +7,15 @@ import Foundation -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + public private(set) var uuid: UUID? public private(set) var dateTime: Date? - public private(set) var map: [String: Animal]? + public private(set) var map: [String:Animal]? - public init(uuid: UUID?, dateTime: Date?, 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/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index a0f7127ef6..ded3fb6912 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model name starting with number */ -public struct Model200Response: Codable { +public struct Model200Response: Codable { + public private(set) var name: Int? public private(set) var _class: String? @@ -18,7 +19,7 @@ public struct Model200Response: Codable { self._class = _class } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case name case _class = "class" } diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index ee70b1f6ee..98f02ee6e9 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model name same as property name */ -public struct Name: Codable { +public struct Name: Codable { + public private(set) var name: Int public private(set) var snakeCase: Int? @@ -22,7 +23,7 @@ public struct Name: Codable { self._123number = _123number } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case name case snakeCase = "snake_case" case property diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 007dfab800..8555908ced 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct NumberOnly: Codable { + +public struct NumberOnly: Codable { + public private(set) var justNumber: Double? @@ -15,7 +17,7 @@ public struct NumberOnly: Codable { self.justNumber = justNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case justNumber = "JustNumber" } diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index 41a1d7d664..6e2f5e5771 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,7 +7,9 @@ import Foundation -public struct Order: Codable { + +public struct Order: Codable { + public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index df6d2512d6..ae7f8e53f7 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -7,7 +7,9 @@ import Foundation -public struct OuterComposite: Codable { + +public struct OuterComposite: Codable { + public private(set) var myNumber: Double? public private(set) var myString: String? @@ -19,7 +21,7 @@ public struct OuterComposite: Codable { self.myBoolean = myBoolean } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case myNumber = "my_number" case myString = "my_string" case myBoolean = "my_boolean" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift index c3b778cbbe..9e6b8d74e8 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -7,6 +7,7 @@ import Foundation + public enum OuterEnum: String, Codable, CaseIterable { case placed = "placed" case approved = "approved" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index 7b99ef3375..95e4aea41c 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,7 +7,9 @@ import Foundation -public struct Pet: Codable { + +public struct Pet: Codable { + public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 30cd4837cc..17f4a4c496 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -7,7 +7,9 @@ import Foundation -public struct ReadOnlyFirst: Codable { + +public struct ReadOnlyFirst: Codable { + public private(set) var bar: String? public private(set) var baz: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index b28b6e99d7..cf81158bec 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing reserved words */ -public struct Return: Codable { +public struct Return: Codable { + public private(set) var _return: Int? @@ -16,7 +17,7 @@ public struct Return: Codable { self._return = _return } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _return = "return" } diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index 266833a0db..f3b2e7cf40 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -7,7 +7,9 @@ import Foundation -public struct SpecialModelName: Codable { + +public struct SpecialModelName: Codable { + public private(set) var specialPropertyName: Int64? @@ -15,7 +17,7 @@ public struct SpecialModelName: Codable { self.specialPropertyName = specialPropertyName } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case specialPropertyName = "$special[property.name]" } diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index dbd5afe270..9642286b26 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -7,9 +7,12 @@ import Foundation -public struct StringBooleanMap: Codable { - public private(set) var additionalProperties: [String: Bool] = [:] +public struct StringBooleanMap: Codable { + + + + public private(set) var additionalProperties: [String:Bool] = [:] public subscript(key: String) -> Bool? { get { @@ -42,4 +45,5 @@ public struct StringBooleanMap: Codable { additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) } + } diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index f827ccf107..4f97c69f68 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,7 +7,9 @@ import Foundation -public struct Tag: Codable { + +public struct Tag: Codable { + public private(set) var id: Int64? public private(set) var name: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index ed3641fdb2..528a2bdd07 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -7,7 +7,9 @@ import Foundation -public struct TypeHolderDefault: Codable { + +public struct TypeHolderDefault: Codable { + public private(set) var stringItem: String = "what" public private(set) var numberItem: Double @@ -23,7 +25,7 @@ public struct TypeHolderDefault: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index 4985005bda..5d68a28668 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -7,7 +7,9 @@ import Foundation -public struct TypeHolderExample: Codable { + +public struct TypeHolderExample: Codable { + public private(set) var stringItem: String public private(set) var numberItem: Double @@ -23,7 +25,7 @@ public struct TypeHolderExample: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 9fba7de818..be82224b26 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,7 +7,9 @@ import Foundation -public struct User: Codable { + +public struct User: Codable { + public private(set) var id: Int64? public private(set) var username: String? diff --git a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 55d0eb4219..22261e2ce9 100644 --- a/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/readonlyProperties/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -14,7 +14,7 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { return URLSessionRequestBuilder.self } - func getBuilder() -> RequestBuilder.Type { + func getBuilder() -> RequestBuilder.Type { return URLSessionDecodableRequestBuilder.self } } @@ -23,16 +23,16 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { private var urlSessionStore = SynchronizedDictionary() open class URLSessionRequestBuilder: RequestBuilder { - + private var observation: NSKeyValueObservation? - + deinit { observation?.invalidate() } - + // swiftlint:disable:next weak_delegate fileprivate let sessionDelegate = SessionDelegate() - + /** May be assigned if you want to control the authentication challenges. */ @@ -45,11 +45,11 @@ open class URLSessionRequestBuilder: RequestBuilder { - retry the request. */ public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + + 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 URLSession configuration. @@ -77,40 +77,40 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { - + open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) throws -> URLRequest { + guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL } - + var originalRequest = URLRequest(url: url) - + originalRequest.httpMethod = method.rawValue - + buildHeaders().forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + headers.forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) - + return modifiedRequest } override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { - let urlSessionId: String = UUID().uuidString + let urlSessionId:String = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() urlSessionStore[urlSessionId] = urlSession - + let parameters: [String: Any] = self.parameters ?? [:] - + let fileKeys = parameters.filter { $1 is URL } .map { $0.0 } - + let encoding: ParameterEncoding if fileKeys.count > 0 { encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) @@ -119,29 +119,29 @@ open class URLSessionRequestBuilder: RequestBuilder { } else { encoding = URLEncoding() } - + guard let xMethod = HTTPMethod(rawValue: method) else { fatalError("Unsuported Http method - \(method)") } - + let cleanupRequest = { urlSessionStore[urlSessionId] = nil self.observation?.invalidate() } - + do { let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) - + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in - + guard let self = self else { return } - + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { - + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in - + guard let self = self else { return } - + if shouldRetry { cleanupRequest() self.execute(apiResponseQueue, completion) @@ -157,13 +157,13 @@ open class URLSessionRequestBuilder: RequestBuilder { } } } - + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { onProgressReady?(dataTask.progress) } - + dataTask.resume() - + } catch { apiResponseQueue.async { cleanupRequest() @@ -172,7 +172,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -192,52 +192,52 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is URL.Type: do { - + guard error == nil else { throw DownloadException.responseFailed } - + guard let data = data else { throw DownloadException.responseDataMissing } - + let fileManager = FileManager.default 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: httpResponse.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(.success(Response(response: httpResponse, body: filePath as? T))) - + } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, requestParserError))) } catch let error { completion(.failure(ErrorResponse.error(400, data, error))) } - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + default: - + completion(.success(Response(response: httpResponse, body: data as? T))) } @@ -251,7 +251,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return httpHeaders } - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { guard let contentDisposition = contentDisposition else { return nil @@ -270,7 +270,7 @@ open class URLSessionRequestBuilder: RequestBuilder { filename = contentItem return filename? - .replacingCharacters(in: range, with: "") + .replacingCharacters(in: range, with:"") .replacingOccurrences(of: "\"", with: "") .trimmingCharacters(in: .whitespacesAndNewlines) } @@ -279,7 +279,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getPath(from url: URL) throws -> String { + fileprivate func getPath(from url : URL) throws -> String { guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { throw DownloadException.requestMissingPath @@ -293,7 +293,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { guard let url = urlRequest.url else { throw DownloadException.requestMissingURL @@ -304,7 +304,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } -open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { +open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -324,28 +324,28 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + case is Data.Type: - + completion(.success(Response(response: httpResponse, body: data as? T))) - + default: - + guard let data = data, !data.isEmpty else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) return } - + let decodeResult = CodableHelper.decode(T.self, from: data) - + switch decodeResult { case let .success(decodableObj): completion(.success(Response(response: httpResponse, body: decodableObj))) @@ -356,10 +356,10 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui } } -private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { - +fileprivate class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + var credential: URLCredential? - + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { @@ -402,13 +402,13 @@ public protocol ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest } -private class URLEncoding: ParameterEncoding { - func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { - +fileprivate class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String : Any]?) throws -> URLRequest { + var urlRequest = urlRequest - + guard let parameters = parameters else { return urlRequest } - + guard let url = urlRequest.url else { throw DownloadException.requestMissingURL } @@ -417,12 +417,12 @@ private class URLEncoding: ParameterEncoding { urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) urlRequest.url = urlComponents.url } - + return urlRequest } } -private class FileUploadEncoding: ParameterEncoding { +fileprivate class FileUploadEncoding: ParameterEncoding { let contentTypeForFormPart: (_ fileURL: URL) -> String? @@ -433,13 +433,13 @@ private class FileUploadEncoding: ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { var urlRequest = urlRequest - + guard let parameters = parameters, !parameters.isEmpty else { return urlRequest } - + let boundary = "Boundary-\(UUID().uuidString)" - + urlRequest.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") for (key, value) in parameters { @@ -479,7 +479,7 @@ private class FileUploadEncoding: ParameterEncoding { fatalError("Unprocessable value \(value) with key \(key)") } } - + var body = urlRequest.httpBody.orEmpty body.append("\r\n--\(boundary)--\r\n") @@ -494,7 +494,7 @@ private class FileUploadEncoding: ParameterEncoding { var urlRequest = urlRequest var body = urlRequest.httpBody.orEmpty - + let fileData = try Data(contentsOf: fileURL) let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) @@ -502,7 +502,7 @@ private class FileUploadEncoding: ParameterEncoding { let fileName = fileURL.lastPathComponent // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } @@ -518,20 +518,20 @@ private class FileUploadEncoding: ParameterEncoding { // The value data. body.append(fileData) - + urlRequest.httpBody = body return urlRequest } - + private func configureDataUploadRequest(urlRequest: URLRequest, boundary: String, name: String, data: Data) -> URLRequest { var urlRequest = urlRequest - + var body = urlRequest.httpBody.orEmpty // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } diff --git a/samples/client/petstore/swift5/resultLibrary/Package.swift b/samples/client/petstore/swift5/resultLibrary/Package.swift index 96dfff54ed..79f6f81887 100644 --- a/samples/client/petstore/swift5/resultLibrary/Package.swift +++ b/samples/client/petstore/swift5/resultLibrary/Package.swift @@ -14,7 +14,7 @@ let package = Package( // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "PetstoreClient", - targets: ["PetstoreClient"]) + targets: ["PetstoreClient"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. @@ -26,6 +26,6 @@ let package = Package( name: "PetstoreClient", dependencies: [], path: "PetstoreClient/Classes" - ) + ), ] ) diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 5b09f95571..2404bc8ffc 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -7,7 +7,7 @@ import Foundation public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + 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 @@ -20,17 +20,17 @@ public struct APIHelper { return destination } - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + 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: ",") + if let collection = item.value as? Array { + 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]? { + public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { guard let source = source else { return nil } @@ -46,15 +46,15 @@ public struct APIHelper { } public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { + if let collection = source as? Array { return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") } return source } - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + 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?] { + if let collection = item.value as? Array { collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } @@ -69,3 +69,4 @@ public struct APIHelper { return destination } } + diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift index a5c2d605df..c5d1b9b42d 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,15 +9,15 @@ 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 customHeaders: [String:String] = [:] public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() public static var apiResponseQueue: DispatchQueue = .main } open class RequestBuilder { var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? + var headers: [String:String] + public let parameters: [String:Any]? public let isBody: Bool public let method: String public let URLString: String @@ -25,9 +25,9 @@ open class RequestBuilder { /// Optional block to obtain a reference to the request's progress instance when available. /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. /// If you need to get the request's progress in older OS versions, please use Alamofire http client. - public var onProgressReady: ((Progress) -> Void)? + public var onProgressReady: ((Progress) -> ())? - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters @@ -37,7 +37,7 @@ open class RequestBuilder { addHeaders(PetstoreClientAPI.customHeaders) } - open func addHeaders(_ aHeaders: [String: String]) { + open func addHeaders(_ aHeaders:[String:String]) { for (header, value) in aHeaders { headers[header] = value } @@ -60,5 +60,5 @@ open class RequestBuilder { public protocol RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type } diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 001f716081..a2e5a2ab25 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class AnotherFakeAPI { /** To test special tags diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 1289d6e2a9..e891da3f12 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class FakeAPI { /** @@ -316,7 +318,7 @@ open class FakeAPI { 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?] = [ + let formParams: [String:Any?] = [ "integer": integer?.encodeToJSON(), "int32": int32?.encodeToJSON(), "int64": int64?.encodeToJSON(), @@ -335,7 +337,7 @@ open class FakeAPI { let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -452,19 +454,19 @@ open class FakeAPI { 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?] = [ + 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_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), "enum_query_double": enumQueryDouble?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -516,13 +518,13 @@ open class FakeAPI { 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 - + 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(), + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), "int64_group": int64Group?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -543,7 +545,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { + open class func testInlineAdditionalProperties(param: [String:String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result) -> Void)) { testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -560,7 +562,7 @@ open class FakeAPI { - parameter param: (body) request body - returns: RequestBuilder */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> 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) @@ -601,14 +603,14 @@ open class FakeAPI { open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { let path = "/fake/jsonFormData" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + 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() diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index f54d6e7fcf..84cf6f9a09 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -7,6 +7,8 @@ import Foundation + + open class FakeClassnameTags123API { /** To test class name in snake case diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index 92893a3129..f35144f8e5 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class PetAPI { /** Add a new pet to the store @@ -82,8 +84,8 @@ open class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let nillableHeaders: [String: Any?] = [ "api_key": apiKey?.encodeToJSON() @@ -135,8 +137,8 @@ open class PetAPI { open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "status": status.encodeToJSON() @@ -180,8 +182,8 @@ open class PetAPI { open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tags": tags.encodeToJSON() @@ -226,8 +228,8 @@ open class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -311,14 +313,14 @@ open class PetAPI { 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?] = [ + 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() @@ -363,14 +365,14 @@ open class PetAPI { 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?] = [ + 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() @@ -415,14 +417,14 @@ open class PetAPI { 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?] = [ + 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() diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index 5024c9dc8f..3990c38d23 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class StoreAPI { /** Delete purchase order by ID @@ -39,8 +41,8 @@ open class StoreAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -54,7 +56,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the result */ - open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<[String: Int], Error>) -> Void)) { + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ result: Swift.Result<[String:Int], Error>) -> Void)) { getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -74,14 +76,14 @@ open class StoreAPI { - name: api_key - returns: RequestBuilder<[String:Int]> */ - open class func getInventoryWithRequestBuilder() -> 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + let requestBuilder: RequestBuilder<[String:Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } @@ -117,8 +119,8 @@ open class StoreAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index c96c572b50..ee4c7a5f35 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class UserAPI { /** Create user @@ -148,8 +150,8 @@ open class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -187,8 +189,8 @@ open class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -226,11 +228,11 @@ open class UserAPI { open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), + "username": username.encodeToJSON(), "password": password.encodeToJSON() ]) @@ -264,8 +266,8 @@ open class UserAPI { open class func logoutUserWithRequestBuilder() -> RequestBuilder { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift index ef971ebadc..01b28a4bd4 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -45,4 +45,4 @@ open class CodableHelper { open class func encode(_ value: T) -> Swift.Result where T: Encodable { return Swift.Result { try self.jsonEncoder.encode(value) } } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift index 627d9adb75..f171525e43 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -7,10 +7,10 @@ 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. @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} + +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 93ed6b90b3..6e279679c6 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -108,24 +108,24 @@ extension String: CodingKey { extension KeyedEncodingContainerProtocol { - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + 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 { + 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 { + 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 { + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { if let pairs = pairs { try encodeMap(pairs) } @@ -135,7 +135,7 @@ extension KeyedEncodingContainerProtocol { extension KeyedDecodingContainerProtocol { - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { var tmpArray = [T]() var nestedContainer = try nestedUnkeyedContainer(forKey: key) @@ -147,8 +147,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil if contains(key) { tmpArray = try decodeArray(T.self, forKey: key) @@ -157,8 +157,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] + 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) { @@ -177,3 +177,5 @@ extension HTTPURLResponse { return Array(200 ..< 300).contains(statusCode) } } + + diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64..08f1ef334d 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -41,7 +41,7 @@ public struct JSONDataEncoding { } public static func encodingParameters(jsonData: Data?) -> [String: Any]? { - var returnedParams: [String: Any]? + var returnedParams: [String: Any]? = nil if let jsonData = jsonData, !jsonData.isEmpty { var params: [String: Any] = [:] params[jsonDataKey] = jsonData diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 02f78ffb47..314f1eff1f 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -9,8 +9,8 @@ import Foundation open class JSONEncodingHelper { - open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { - var params: [String: Any]? + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? = nil // Encode the Encodable object if let encodableObj = encodableObj { @@ -27,7 +27,7 @@ open class JSONEncodingHelper { } open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { - var params: [String: Any]? + var params: [String: Any]? = nil if let encodableObj = encodableObj { do { @@ -41,5 +41,5 @@ open class JSONEncodingHelper { return params } - + } diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift index c0542c14c0..11e81ffcc4 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,11 +10,11 @@ protocol JSONEncodable { func encodeToJSON() -> Any } -public enum ErrorResponse: Error { +public enum ErrorResponse : Error { case error(Int, Data?, Error) } -public enum DownloadException: Error { +public enum DownloadException : Error { case responseDataMissing case responseFailed case requestMissing @@ -30,6 +30,7 @@ public enum DecodableRequestBuilderError: Error { case generalError(Error) } + open class Response { public let statusCode: Int public let header: [String: String] @@ -43,7 +44,7 @@ open class Response { public convenience init(response: HTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String: String]() + var header = [String:String]() for (key, value) in rawHeader { if let key = key.base as? String, let value = value as? String { header[key] = value diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 1af0315359..28ca8377b8 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -7,17 +7,19 @@ import Foundation -public struct AdditionalPropertiesClass: Codable { - public var mapString: [String: String]? - public var mapMapString: [String: [String: String]]? +public struct AdditionalPropertiesClass: Codable { - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + + 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, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case mapString = "map_string" case mapMapString = "map_map_string" } diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index 5ed9f31e2a..1050d79dbe 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -7,7 +7,9 @@ import Foundation -public struct Animal: Codable { + +public struct Animal: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift index e09b0e9efd..e7bea63f8e 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -7,4 +7,5 @@ import Foundation + public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index ec270da890..4d0393b9ba 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -7,7 +7,9 @@ import Foundation -public struct ApiResponse: Codable { + +public struct ApiResponse: Codable { + public var code: Int? public var type: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 6c252ed475..1363c96394 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayOfArrayOfNumberOnly: Codable { + +public struct ArrayOfArrayOfNumberOnly: Codable { + public var arrayArrayNumber: [[Double]]? @@ -15,7 +17,7 @@ public struct ArrayOfArrayOfNumberOnly: Codable { self.arrayArrayNumber = arrayArrayNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayArrayNumber = "ArrayArrayNumber" } diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index e84eb5d650..6b8873730c 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayOfNumberOnly: Codable { + +public struct ArrayOfNumberOnly: Codable { + public var arrayNumber: [Double]? @@ -15,7 +17,7 @@ public struct ArrayOfNumberOnly: Codable { self.arrayNumber = arrayNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayNumber = "ArrayNumber" } diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index d2140933d1..64f7c6d9db 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayTest: Codable { + +public struct ArrayTest: Codable { + public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? @@ -19,7 +21,7 @@ public struct ArrayTest: Codable { self.arrayArrayOfModel = arrayArrayOfModel } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayOfString = "array_of_string" case arrayArrayOfInteger = "array_array_of_integer" case arrayArrayOfModel = "array_array_of_model" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index d1b3b27616..ddb669a590 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -7,7 +7,9 @@ import Foundation -public struct Capitalization: Codable { + +public struct Capitalization: Codable { + public var smallCamel: String? public var capitalCamel: String? @@ -26,7 +28,7 @@ public struct Capitalization: Codable { self.ATT_NAME = ATT_NAME } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case smallCamel case capitalCamel = "CapitalCamel" case smallSnake = "small_Snake" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 7ab887f311..c4f6e0d488 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -7,7 +7,9 @@ import Foundation -public struct Cat: Codable { + +public struct Cat: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index a51ad0dffa..7b1d7e32be 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -7,7 +7,9 @@ import Foundation -public struct CatAllOf: Codable { + +public struct CatAllOf: Codable { + public var declawed: Bool? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index eb8f7e5e19..3ec00f5ab1 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,7 +7,9 @@ import Foundation -public struct Category: Codable { + +public struct Category: Codable { + public var id: Int64? public var name: String = "default-name" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index e2a7d4427a..af030c3dd6 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable { +public struct ClassModel: Codable { + public var _class: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 00245ca372..0aae748c76 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -7,7 +7,9 @@ import Foundation -public struct Client: Codable { + +public struct Client: Codable { + public var client: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 492c122800..198e28b94d 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -7,7 +7,9 @@ import Foundation -public struct Dog: Codable { + +public struct Dog: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 7786f8acc5..8ff49b2af2 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -7,7 +7,9 @@ import Foundation -public struct DogAllOf: Codable { + +public struct DogAllOf: Codable { + public var breed: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 9844e7c40e..e2d3fa04f9 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -7,7 +7,9 @@ import Foundation -public struct EnumArrays: Codable { + +public struct EnumArrays: Codable { + public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" @@ -25,7 +27,7 @@ public struct EnumArrays: Codable { self.arrayEnum = arrayEnum } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case justSymbol = "just_symbol" case arrayEnum = "array_enum" } diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift index d4029d73f8..c2c639ba32 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -7,6 +7,7 @@ import Foundation + public enum EnumClass: String, Codable, CaseIterable { case abc = "_abc" case efg = "-efg" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 789f583e1d..a56e1f3638 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct EnumTest: Codable { + +public struct EnumTest: Codable { + public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" @@ -41,7 +43,7 @@ public struct EnumTest: Codable { self.outerEnum = outerEnum } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case enumString = "enum_string" case enumStringRequired = "enum_string_required" case enumInteger = "enum_integer" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift index abf3ccffc4..773b53b2cb 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -8,7 +8,8 @@ import Foundation /** Must be named `File` for test. */ -public struct File: Codable { +public struct File: Codable { + /** Test capitalization */ public var sourceURI: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 532f145793..83dc1148cf 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -7,7 +7,9 @@ import Foundation -public struct FileSchemaTestClass: Codable { + +public struct FileSchemaTestClass: Codable { + public var file: File? public var files: [File]? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 20bd6d103b..bccd3f9fb1 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct FormatTest: Codable { + +public struct FormatTest: Codable { + public var integer: Int? public var int32: Int? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 906ddb06fb..566d71a35e 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct HasOnlyReadOnly: Codable { + +public struct HasOnlyReadOnly: Codable { + public var bar: String? public var foo: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift index fe13d302cc..80cecab242 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -7,7 +7,9 @@ import Foundation -public struct List: Codable { + +public struct List: Codable { + public var _123list: String? @@ -15,7 +17,7 @@ public struct List: Codable { self._123list = _123list } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _123list = "123-list" } diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 4b6037f378..f0c02de95f 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -7,25 +7,27 @@ import Foundation -public struct MapTest: Codable { + +public struct MapTest: Codable { + public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" case lower = "lower" } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? + 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?) { + 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, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case mapMapOfString = "map_map_of_string" case mapOfEnumString = "map_of_enum_string" case directMap = "direct_map" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c3deb2f289..710e62a9b5 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -7,13 +7,15 @@ import Foundation -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + public var uuid: UUID? public var dateTime: Date? - public var map: [String: Animal]? + public var map: [String:Animal]? - public init(uuid: UUID?, dateTime: Date?, 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/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index b61db7d6e7..450a53b918 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model name starting with number */ -public struct Model200Response: Codable { +public struct Model200Response: Codable { + public var name: Int? public var _class: String? @@ -18,7 +19,7 @@ public struct Model200Response: Codable { self._class = _class } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case name case _class = "class" } diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 8ab4db44b7..6deb69fcd7 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model name same as property name */ -public struct Name: Codable { +public struct Name: Codable { + public var name: Int public var snakeCase: Int? @@ -22,7 +23,7 @@ public struct Name: Codable { self._123number = _123number } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case name case snakeCase = "snake_case" case property diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 4d1dafcc2c..0c9ee2b7b9 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct NumberOnly: Codable { + +public struct NumberOnly: Codable { + public var justNumber: Double? @@ -15,7 +17,7 @@ public struct NumberOnly: Codable { self.justNumber = justNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case justNumber = "JustNumber" } diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index 40c30cc860..ab0eac0b30 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,7 +7,9 @@ import Foundation -public struct Order: Codable { + +public struct Order: Codable { + public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index 18c3a024f1..4a7d227104 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -7,7 +7,9 @@ import Foundation -public struct OuterComposite: Codable { + +public struct OuterComposite: Codable { + public var myNumber: Double? public var myString: String? @@ -19,7 +21,7 @@ public struct OuterComposite: Codable { self.myBoolean = myBoolean } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case myNumber = "my_number" case myString = "my_string" case myBoolean = "my_boolean" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift index c3b778cbbe..9e6b8d74e8 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -7,6 +7,7 @@ import Foundation + public enum OuterEnum: String, Codable, CaseIterable { case placed = "placed" case approved = "approved" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index b9ce0e9332..a973071d6c 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,7 +7,9 @@ import Foundation -public struct Pet: Codable { + +public struct Pet: Codable { + public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 0acd21fd10..b2a6b7e2b8 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -7,7 +7,9 @@ import Foundation -public struct ReadOnlyFirst: Codable { + +public struct ReadOnlyFirst: Codable { + public var bar: String? public var baz: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index c223f993a6..7e089dcee2 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing reserved words */ -public struct Return: Codable { +public struct Return: Codable { + public var _return: Int? @@ -16,7 +17,7 @@ public struct Return: Codable { self._return = _return } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _return = "return" } diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index 6e8650f76d..e890ef9525 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -7,7 +7,9 @@ import Foundation -public struct SpecialModelName: Codable { + +public struct SpecialModelName: Codable { + public var specialPropertyName: Int64? @@ -15,7 +17,7 @@ public struct SpecialModelName: Codable { self.specialPropertyName = specialPropertyName } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case specialPropertyName = "$special[property.name]" } diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 3f1237fee4..f65ae0623d 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -7,9 +7,12 @@ import Foundation -public struct StringBooleanMap: Codable { - public var additionalProperties: [String: Bool] = [:] +public struct StringBooleanMap: Codable { + + + + public var additionalProperties: [String:Bool] = [:] public subscript(key: String) -> Bool? { get { @@ -42,4 +45,5 @@ public struct StringBooleanMap: Codable { additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) } + } diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 4dd8a9a9f5..a91b6061bc 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,7 +7,9 @@ import Foundation -public struct Tag: Codable { + +public struct Tag: Codable { + public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index a9e088808e..2d377c3edb 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -7,7 +7,9 @@ import Foundation -public struct TypeHolderDefault: Codable { + +public struct TypeHolderDefault: Codable { + public var stringItem: String = "what" public var numberItem: Double @@ -23,7 +25,7 @@ public struct TypeHolderDefault: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index dff4083ae4..e5eb92da69 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -7,7 +7,9 @@ import Foundation -public struct TypeHolderExample: Codable { + +public struct TypeHolderExample: Codable { + public var stringItem: String public var numberItem: Double @@ -23,7 +25,7 @@ public struct TypeHolderExample: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 79f271ed73..f70328ca9e 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,7 +7,9 @@ import Foundation -public struct User: Codable { + +public struct User: Codable { + public var id: Int64? public var username: String? diff --git a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 55d0eb4219..22261e2ce9 100644 --- a/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/resultLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -14,7 +14,7 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { return URLSessionRequestBuilder.self } - func getBuilder() -> RequestBuilder.Type { + func getBuilder() -> RequestBuilder.Type { return URLSessionDecodableRequestBuilder.self } } @@ -23,16 +23,16 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { private var urlSessionStore = SynchronizedDictionary() open class URLSessionRequestBuilder: RequestBuilder { - + private var observation: NSKeyValueObservation? - + deinit { observation?.invalidate() } - + // swiftlint:disable:next weak_delegate fileprivate let sessionDelegate = SessionDelegate() - + /** May be assigned if you want to control the authentication challenges. */ @@ -45,11 +45,11 @@ open class URLSessionRequestBuilder: RequestBuilder { - retry the request. */ public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + + 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 URLSession configuration. @@ -77,40 +77,40 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { - + open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) throws -> URLRequest { + guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL } - + var originalRequest = URLRequest(url: url) - + originalRequest.httpMethod = method.rawValue - + buildHeaders().forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + headers.forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) - + return modifiedRequest } override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { - let urlSessionId: String = UUID().uuidString + let urlSessionId:String = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() urlSessionStore[urlSessionId] = urlSession - + let parameters: [String: Any] = self.parameters ?? [:] - + let fileKeys = parameters.filter { $1 is URL } .map { $0.0 } - + let encoding: ParameterEncoding if fileKeys.count > 0 { encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) @@ -119,29 +119,29 @@ open class URLSessionRequestBuilder: RequestBuilder { } else { encoding = URLEncoding() } - + guard let xMethod = HTTPMethod(rawValue: method) else { fatalError("Unsuported Http method - \(method)") } - + let cleanupRequest = { urlSessionStore[urlSessionId] = nil self.observation?.invalidate() } - + do { let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) - + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in - + guard let self = self else { return } - + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { - + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in - + guard let self = self else { return } - + if shouldRetry { cleanupRequest() self.execute(apiResponseQueue, completion) @@ -157,13 +157,13 @@ open class URLSessionRequestBuilder: RequestBuilder { } } } - + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { onProgressReady?(dataTask.progress) } - + dataTask.resume() - + } catch { apiResponseQueue.async { cleanupRequest() @@ -172,7 +172,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -192,52 +192,52 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is URL.Type: do { - + guard error == nil else { throw DownloadException.responseFailed } - + guard let data = data else { throw DownloadException.responseDataMissing } - + let fileManager = FileManager.default 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: httpResponse.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(.success(Response(response: httpResponse, body: filePath as? T))) - + } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, requestParserError))) } catch let error { completion(.failure(ErrorResponse.error(400, data, error))) } - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + default: - + completion(.success(Response(response: httpResponse, body: data as? T))) } @@ -251,7 +251,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return httpHeaders } - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { guard let contentDisposition = contentDisposition else { return nil @@ -270,7 +270,7 @@ open class URLSessionRequestBuilder: RequestBuilder { filename = contentItem return filename? - .replacingCharacters(in: range, with: "") + .replacingCharacters(in: range, with:"") .replacingOccurrences(of: "\"", with: "") .trimmingCharacters(in: .whitespacesAndNewlines) } @@ -279,7 +279,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getPath(from url: URL) throws -> String { + fileprivate func getPath(from url : URL) throws -> String { guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { throw DownloadException.requestMissingPath @@ -293,7 +293,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { guard let url = urlRequest.url else { throw DownloadException.requestMissingURL @@ -304,7 +304,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } -open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { +open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -324,28 +324,28 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + case is Data.Type: - + completion(.success(Response(response: httpResponse, body: data as? T))) - + default: - + guard let data = data, !data.isEmpty else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) return } - + let decodeResult = CodableHelper.decode(T.self, from: data) - + switch decodeResult { case let .success(decodableObj): completion(.success(Response(response: httpResponse, body: decodableObj))) @@ -356,10 +356,10 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui } } -private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { - +fileprivate class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + var credential: URLCredential? - + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { @@ -402,13 +402,13 @@ public protocol ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest } -private class URLEncoding: ParameterEncoding { - func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { - +fileprivate class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String : Any]?) throws -> URLRequest { + var urlRequest = urlRequest - + guard let parameters = parameters else { return urlRequest } - + guard let url = urlRequest.url else { throw DownloadException.requestMissingURL } @@ -417,12 +417,12 @@ private class URLEncoding: ParameterEncoding { urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) urlRequest.url = urlComponents.url } - + return urlRequest } } -private class FileUploadEncoding: ParameterEncoding { +fileprivate class FileUploadEncoding: ParameterEncoding { let contentTypeForFormPart: (_ fileURL: URL) -> String? @@ -433,13 +433,13 @@ private class FileUploadEncoding: ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { var urlRequest = urlRequest - + guard let parameters = parameters, !parameters.isEmpty else { return urlRequest } - + let boundary = "Boundary-\(UUID().uuidString)" - + urlRequest.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") for (key, value) in parameters { @@ -479,7 +479,7 @@ private class FileUploadEncoding: ParameterEncoding { fatalError("Unprocessable value \(value) with key \(key)") } } - + var body = urlRequest.httpBody.orEmpty body.append("\r\n--\(boundary)--\r\n") @@ -494,7 +494,7 @@ private class FileUploadEncoding: ParameterEncoding { var urlRequest = urlRequest var body = urlRequest.httpBody.orEmpty - + let fileData = try Data(contentsOf: fileURL) let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) @@ -502,7 +502,7 @@ private class FileUploadEncoding: ParameterEncoding { let fileName = fileURL.lastPathComponent // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } @@ -518,20 +518,20 @@ private class FileUploadEncoding: ParameterEncoding { // The value data. body.append(fileData) - + urlRequest.httpBody = body return urlRequest } - + private func configureDataUploadRequest(urlRequest: URLRequest, boundary: String, name: String, data: Data) -> URLRequest { var urlRequest = urlRequest - + var body = urlRequest.httpBody.orEmpty // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/Package.swift b/samples/client/petstore/swift5/rxswiftLibrary/Package.swift index 24f9a6c99a..4b20458197 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/Package.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/Package.swift @@ -14,11 +14,11 @@ let package = Package( // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "PetstoreClient", - targets: ["PetstoreClient"]) + targets: ["PetstoreClient"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. - .package(url: "https://github.com/ReactiveX/RxSwift.git", from: "5.0.0") + .package(url: "https://github.com/ReactiveX/RxSwift.git", from: "5.0.0"), ], targets: [ // Targets are the basic building blocks of a package. A target can define a module or a test suite. @@ -27,6 +27,6 @@ let package = Package( name: "PetstoreClient", dependencies: ["RxSwift"], path: "PetstoreClient/Classes" - ) + ), ] ) diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 5b09f95571..2404bc8ffc 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -7,7 +7,7 @@ import Foundation public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + 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 @@ -20,17 +20,17 @@ public struct APIHelper { return destination } - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + 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: ",") + if let collection = item.value as? Array { + 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]? { + public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { guard let source = source else { return nil } @@ -46,15 +46,15 @@ public struct APIHelper { } public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { + if let collection = source as? Array { return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") } return source } - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + 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?] { + if let collection = item.value as? Array { collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } @@ -69,3 +69,4 @@ public struct APIHelper { return destination } } + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift index a5c2d605df..c5d1b9b42d 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,15 +9,15 @@ 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 customHeaders: [String:String] = [:] public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() public static var apiResponseQueue: DispatchQueue = .main } open class RequestBuilder { var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? + var headers: [String:String] + public let parameters: [String:Any]? public let isBody: Bool public let method: String public let URLString: String @@ -25,9 +25,9 @@ open class RequestBuilder { /// Optional block to obtain a reference to the request's progress instance when available. /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. /// If you need to get the request's progress in older OS versions, please use Alamofire http client. - public var onProgressReady: ((Progress) -> Void)? + public var onProgressReady: ((Progress) -> ())? - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters @@ -37,7 +37,7 @@ open class RequestBuilder { addHeaders(PetstoreClientAPI.customHeaders) } - open func addHeaders(_ aHeaders: [String: String]) { + open func addHeaders(_ aHeaders:[String:String]) { for (header, value) in aHeaders { headers[header] = value } @@ -60,5 +60,5 @@ open class RequestBuilder { public protocol RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 792371b384..4090e37b32 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -8,6 +8,8 @@ import Foundation import RxSwift + + open class AnotherFakeAPI { /** To test special tags diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 3e9b32438c..fa3d09834f 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -8,6 +8,8 @@ import Foundation import RxSwift + + open class FakeAPI { /** @@ -349,7 +351,7 @@ open class FakeAPI { 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?] = [ + let formParams: [String:Any?] = [ "integer": integer?.encodeToJSON(), "int32": int32?.encodeToJSON(), "int64": int64?.encodeToJSON(), @@ -368,7 +370,7 @@ open class FakeAPI { let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -489,19 +491,19 @@ open class FakeAPI { 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?] = [ + 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_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), "enum_query_double": enumQueryDouble?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -557,13 +559,13 @@ open class FakeAPI { 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 - + 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(), + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), "int64_group": int64Group?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -584,7 +586,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - returns: Observable */ - open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { + open class func testInlineAdditionalProperties(param: [String:String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable { return Observable.create { observer -> Disposable in testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in switch result { @@ -605,7 +607,7 @@ open class FakeAPI { - parameter param: (body) request body - returns: RequestBuilder */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> 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) @@ -650,14 +652,14 @@ open class FakeAPI { open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { let path = "/fake/jsonFormData" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + 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() diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index 989a914f37..1353f91b27 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -8,6 +8,8 @@ import Foundation import RxSwift + + open class FakeClassnameTags123API { /** To test class name in snake case diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index b3a2690236..41cb591c89 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -8,6 +8,8 @@ import Foundation import RxSwift + + open class PetAPI { /** Add a new pet to the store @@ -91,8 +93,8 @@ open class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let nillableHeaders: [String: Any?] = [ "api_key": apiKey?.encodeToJSON() @@ -148,8 +150,8 @@ open class PetAPI { open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "status": status.encodeToJSON() @@ -197,8 +199,8 @@ open class PetAPI { open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tags": tags.encodeToJSON() @@ -247,8 +249,8 @@ open class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -340,14 +342,14 @@ open class PetAPI { 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?] = [ + 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() @@ -396,14 +398,14 @@ open class PetAPI { 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?] = [ + 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() @@ -452,14 +454,14 @@ open class PetAPI { 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?] = [ + 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() diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index dea3933433..f5c974ba38 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -8,6 +8,8 @@ import Foundation import RxSwift + + open class StoreAPI { /** Delete purchase order by ID @@ -44,8 +46,8 @@ open class StoreAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -59,7 +61,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - returns: Observable<[String:Int]> */ - open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable<[String: Int]> { + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue) -> Observable<[String:Int]> { return Observable.create { observer -> Disposable in getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in switch result { @@ -83,14 +85,14 @@ open class StoreAPI { - name: api_key - returns: RequestBuilder<[String:Int]> */ - open class func getInventoryWithRequestBuilder() -> 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + let requestBuilder: RequestBuilder<[String:Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } @@ -130,8 +132,8 @@ open class StoreAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index 3447ea28c0..2228363cfc 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -8,6 +8,8 @@ import Foundation import RxSwift + + open class UserAPI { /** Create user @@ -165,8 +167,8 @@ open class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -208,8 +210,8 @@ open class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -251,11 +253,11 @@ open class UserAPI { open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), + "username": username.encodeToJSON(), "password": password.encodeToJSON() ]) @@ -293,8 +295,8 @@ open class UserAPI { open class func logoutUserWithRequestBuilder() -> RequestBuilder { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift index ef971ebadc..01b28a4bd4 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -45,4 +45,4 @@ open class CodableHelper { open class func encode(_ value: T) -> Swift.Result where T: Encodable { return Swift.Result { try self.jsonEncoder.encode(value) } } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift index 627d9adb75..f171525e43 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -7,10 +7,10 @@ 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. @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} + +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 93ed6b90b3..6e279679c6 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -108,24 +108,24 @@ extension String: CodingKey { extension KeyedEncodingContainerProtocol { - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + 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 { + 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 { + 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 { + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { if let pairs = pairs { try encodeMap(pairs) } @@ -135,7 +135,7 @@ extension KeyedEncodingContainerProtocol { extension KeyedDecodingContainerProtocol { - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { var tmpArray = [T]() var nestedContainer = try nestedUnkeyedContainer(forKey: key) @@ -147,8 +147,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil if contains(key) { tmpArray = try decodeArray(T.self, forKey: key) @@ -157,8 +157,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] + 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) { @@ -177,3 +177,5 @@ extension HTTPURLResponse { return Array(200 ..< 300).contains(statusCode) } } + + diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64..08f1ef334d 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -41,7 +41,7 @@ public struct JSONDataEncoding { } public static func encodingParameters(jsonData: Data?) -> [String: Any]? { - var returnedParams: [String: Any]? + var returnedParams: [String: Any]? = nil if let jsonData = jsonData, !jsonData.isEmpty { var params: [String: Any] = [:] params[jsonDataKey] = jsonData diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 02f78ffb47..314f1eff1f 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -9,8 +9,8 @@ import Foundation open class JSONEncodingHelper { - open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { - var params: [String: Any]? + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? = nil // Encode the Encodable object if let encodableObj = encodableObj { @@ -27,7 +27,7 @@ open class JSONEncodingHelper { } open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { - var params: [String: Any]? + var params: [String: Any]? = nil if let encodableObj = encodableObj { do { @@ -41,5 +41,5 @@ open class JSONEncodingHelper { return params } - + } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift index c0542c14c0..11e81ffcc4 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,11 +10,11 @@ protocol JSONEncodable { func encodeToJSON() -> Any } -public enum ErrorResponse: Error { +public enum ErrorResponse : Error { case error(Int, Data?, Error) } -public enum DownloadException: Error { +public enum DownloadException : Error { case responseDataMissing case responseFailed case requestMissing @@ -30,6 +30,7 @@ public enum DecodableRequestBuilderError: Error { case generalError(Error) } + open class Response { public let statusCode: Int public let header: [String: String] @@ -43,7 +44,7 @@ open class Response { public convenience init(response: HTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String: String]() + var header = [String:String]() for (key, value) in rawHeader { if let key = key.base as? String, let value = value as? String { header[key] = value diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 1af0315359..28ca8377b8 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -7,17 +7,19 @@ import Foundation -public struct AdditionalPropertiesClass: Codable { - public var mapString: [String: String]? - public var mapMapString: [String: [String: String]]? +public struct AdditionalPropertiesClass: Codable { - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + + 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, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case mapString = "map_string" case mapMapString = "map_map_string" } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index 5ed9f31e2a..1050d79dbe 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -7,7 +7,9 @@ import Foundation -public struct Animal: Codable { + +public struct Animal: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift index e09b0e9efd..e7bea63f8e 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -7,4 +7,5 @@ import Foundation + public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index ec270da890..4d0393b9ba 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -7,7 +7,9 @@ import Foundation -public struct ApiResponse: Codable { + +public struct ApiResponse: Codable { + public var code: Int? public var type: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 6c252ed475..1363c96394 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayOfArrayOfNumberOnly: Codable { + +public struct ArrayOfArrayOfNumberOnly: Codable { + public var arrayArrayNumber: [[Double]]? @@ -15,7 +17,7 @@ public struct ArrayOfArrayOfNumberOnly: Codable { self.arrayArrayNumber = arrayArrayNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayArrayNumber = "ArrayArrayNumber" } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index e84eb5d650..6b8873730c 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayOfNumberOnly: Codable { + +public struct ArrayOfNumberOnly: Codable { + public var arrayNumber: [Double]? @@ -15,7 +17,7 @@ public struct ArrayOfNumberOnly: Codable { self.arrayNumber = arrayNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayNumber = "ArrayNumber" } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index d2140933d1..64f7c6d9db 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayTest: Codable { + +public struct ArrayTest: Codable { + public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? @@ -19,7 +21,7 @@ public struct ArrayTest: Codable { self.arrayArrayOfModel = arrayArrayOfModel } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayOfString = "array_of_string" case arrayArrayOfInteger = "array_array_of_integer" case arrayArrayOfModel = "array_array_of_model" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index d1b3b27616..ddb669a590 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -7,7 +7,9 @@ import Foundation -public struct Capitalization: Codable { + +public struct Capitalization: Codable { + public var smallCamel: String? public var capitalCamel: String? @@ -26,7 +28,7 @@ public struct Capitalization: Codable { self.ATT_NAME = ATT_NAME } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case smallCamel case capitalCamel = "CapitalCamel" case smallSnake = "small_Snake" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 7ab887f311..c4f6e0d488 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -7,7 +7,9 @@ import Foundation -public struct Cat: Codable { + +public struct Cat: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index a51ad0dffa..7b1d7e32be 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -7,7 +7,9 @@ import Foundation -public struct CatAllOf: Codable { + +public struct CatAllOf: Codable { + public var declawed: Bool? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index eb8f7e5e19..3ec00f5ab1 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,7 +7,9 @@ import Foundation -public struct Category: Codable { + +public struct Category: Codable { + public var id: Int64? public var name: String = "default-name" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index e2a7d4427a..af030c3dd6 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable { +public struct ClassModel: Codable { + public var _class: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 00245ca372..0aae748c76 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -7,7 +7,9 @@ import Foundation -public struct Client: Codable { + +public struct Client: Codable { + public var client: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 492c122800..198e28b94d 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -7,7 +7,9 @@ import Foundation -public struct Dog: Codable { + +public struct Dog: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 7786f8acc5..8ff49b2af2 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -7,7 +7,9 @@ import Foundation -public struct DogAllOf: Codable { + +public struct DogAllOf: Codable { + public var breed: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 9844e7c40e..e2d3fa04f9 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -7,7 +7,9 @@ import Foundation -public struct EnumArrays: Codable { + +public struct EnumArrays: Codable { + public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" @@ -25,7 +27,7 @@ public struct EnumArrays: Codable { self.arrayEnum = arrayEnum } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case justSymbol = "just_symbol" case arrayEnum = "array_enum" } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift index d4029d73f8..c2c639ba32 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -7,6 +7,7 @@ import Foundation + public enum EnumClass: String, Codable, CaseIterable { case abc = "_abc" case efg = "-efg" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 789f583e1d..a56e1f3638 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct EnumTest: Codable { + +public struct EnumTest: Codable { + public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" @@ -41,7 +43,7 @@ public struct EnumTest: Codable { self.outerEnum = outerEnum } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case enumString = "enum_string" case enumStringRequired = "enum_string_required" case enumInteger = "enum_integer" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift index abf3ccffc4..773b53b2cb 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -8,7 +8,8 @@ import Foundation /** Must be named `File` for test. */ -public struct File: Codable { +public struct File: Codable { + /** Test capitalization */ public var sourceURI: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 532f145793..83dc1148cf 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -7,7 +7,9 @@ import Foundation -public struct FileSchemaTestClass: Codable { + +public struct FileSchemaTestClass: Codable { + public var file: File? public var files: [File]? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 20bd6d103b..bccd3f9fb1 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct FormatTest: Codable { + +public struct FormatTest: Codable { + public var integer: Int? public var int32: Int? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 906ddb06fb..566d71a35e 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct HasOnlyReadOnly: Codable { + +public struct HasOnlyReadOnly: Codable { + public var bar: String? public var foo: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift index fe13d302cc..80cecab242 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -7,7 +7,9 @@ import Foundation -public struct List: Codable { + +public struct List: Codable { + public var _123list: String? @@ -15,7 +17,7 @@ public struct List: Codable { self._123list = _123list } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _123list = "123-list" } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 4b6037f378..f0c02de95f 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -7,25 +7,27 @@ import Foundation -public struct MapTest: Codable { + +public struct MapTest: Codable { + public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" case lower = "lower" } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? + 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?) { + 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, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case mapMapOfString = "map_map_of_string" case mapOfEnumString = "map_of_enum_string" case directMap = "direct_map" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c3deb2f289..710e62a9b5 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -7,13 +7,15 @@ import Foundation -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + public var uuid: UUID? public var dateTime: Date? - public var map: [String: Animal]? + public var map: [String:Animal]? - public init(uuid: UUID?, dateTime: Date?, 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/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index b61db7d6e7..450a53b918 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model name starting with number */ -public struct Model200Response: Codable { +public struct Model200Response: Codable { + public var name: Int? public var _class: String? @@ -18,7 +19,7 @@ public struct Model200Response: Codable { self._class = _class } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case name case _class = "class" } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 8ab4db44b7..6deb69fcd7 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model name same as property name */ -public struct Name: Codable { +public struct Name: Codable { + public var name: Int public var snakeCase: Int? @@ -22,7 +23,7 @@ public struct Name: Codable { self._123number = _123number } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case name case snakeCase = "snake_case" case property diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 4d1dafcc2c..0c9ee2b7b9 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct NumberOnly: Codable { + +public struct NumberOnly: Codable { + public var justNumber: Double? @@ -15,7 +17,7 @@ public struct NumberOnly: Codable { self.justNumber = justNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case justNumber = "JustNumber" } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index 40c30cc860..ab0eac0b30 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,7 +7,9 @@ import Foundation -public struct Order: Codable { + +public struct Order: Codable { + public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index 18c3a024f1..4a7d227104 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -7,7 +7,9 @@ import Foundation -public struct OuterComposite: Codable { + +public struct OuterComposite: Codable { + public var myNumber: Double? public var myString: String? @@ -19,7 +21,7 @@ public struct OuterComposite: Codable { self.myBoolean = myBoolean } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case myNumber = "my_number" case myString = "my_string" case myBoolean = "my_boolean" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift index c3b778cbbe..9e6b8d74e8 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -7,6 +7,7 @@ import Foundation + public enum OuterEnum: String, Codable, CaseIterable { case placed = "placed" case approved = "approved" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index b9ce0e9332..a973071d6c 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,7 +7,9 @@ import Foundation -public struct Pet: Codable { + +public struct Pet: Codable { + public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 0acd21fd10..b2a6b7e2b8 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -7,7 +7,9 @@ import Foundation -public struct ReadOnlyFirst: Codable { + +public struct ReadOnlyFirst: Codable { + public var bar: String? public var baz: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index c223f993a6..7e089dcee2 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing reserved words */ -public struct Return: Codable { +public struct Return: Codable { + public var _return: Int? @@ -16,7 +17,7 @@ public struct Return: Codable { self._return = _return } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _return = "return" } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index 6e8650f76d..e890ef9525 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -7,7 +7,9 @@ import Foundation -public struct SpecialModelName: Codable { + +public struct SpecialModelName: Codable { + public var specialPropertyName: Int64? @@ -15,7 +17,7 @@ public struct SpecialModelName: Codable { self.specialPropertyName = specialPropertyName } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case specialPropertyName = "$special[property.name]" } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 3f1237fee4..f65ae0623d 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -7,9 +7,12 @@ import Foundation -public struct StringBooleanMap: Codable { - public var additionalProperties: [String: Bool] = [:] +public struct StringBooleanMap: Codable { + + + + public var additionalProperties: [String:Bool] = [:] public subscript(key: String) -> Bool? { get { @@ -42,4 +45,5 @@ public struct StringBooleanMap: Codable { additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) } + } diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 4dd8a9a9f5..a91b6061bc 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,7 +7,9 @@ import Foundation -public struct Tag: Codable { + +public struct Tag: Codable { + public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index a9e088808e..2d377c3edb 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -7,7 +7,9 @@ import Foundation -public struct TypeHolderDefault: Codable { + +public struct TypeHolderDefault: Codable { + public var stringItem: String = "what" public var numberItem: Double @@ -23,7 +25,7 @@ public struct TypeHolderDefault: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index dff4083ae4..e5eb92da69 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -7,7 +7,9 @@ import Foundation -public struct TypeHolderExample: Codable { + +public struct TypeHolderExample: Codable { + public var stringItem: String public var numberItem: Double @@ -23,7 +25,7 @@ public struct TypeHolderExample: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 79f271ed73..f70328ca9e 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,7 +7,9 @@ import Foundation -public struct User: Codable { + +public struct User: Codable { + public var id: Int64? public var username: String? diff --git a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 55d0eb4219..22261e2ce9 100644 --- a/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/rxswiftLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -14,7 +14,7 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { return URLSessionRequestBuilder.self } - func getBuilder() -> RequestBuilder.Type { + func getBuilder() -> RequestBuilder.Type { return URLSessionDecodableRequestBuilder.self } } @@ -23,16 +23,16 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { private var urlSessionStore = SynchronizedDictionary() open class URLSessionRequestBuilder: RequestBuilder { - + private var observation: NSKeyValueObservation? - + deinit { observation?.invalidate() } - + // swiftlint:disable:next weak_delegate fileprivate let sessionDelegate = SessionDelegate() - + /** May be assigned if you want to control the authentication challenges. */ @@ -45,11 +45,11 @@ open class URLSessionRequestBuilder: RequestBuilder { - retry the request. */ public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + + 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 URLSession configuration. @@ -77,40 +77,40 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { - + open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) throws -> URLRequest { + guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL } - + var originalRequest = URLRequest(url: url) - + originalRequest.httpMethod = method.rawValue - + buildHeaders().forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + headers.forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) - + return modifiedRequest } override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { - let urlSessionId: String = UUID().uuidString + let urlSessionId:String = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() urlSessionStore[urlSessionId] = urlSession - + let parameters: [String: Any] = self.parameters ?? [:] - + let fileKeys = parameters.filter { $1 is URL } .map { $0.0 } - + let encoding: ParameterEncoding if fileKeys.count > 0 { encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) @@ -119,29 +119,29 @@ open class URLSessionRequestBuilder: RequestBuilder { } else { encoding = URLEncoding() } - + guard let xMethod = HTTPMethod(rawValue: method) else { fatalError("Unsuported Http method - \(method)") } - + let cleanupRequest = { urlSessionStore[urlSessionId] = nil self.observation?.invalidate() } - + do { let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) - + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in - + guard let self = self else { return } - + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { - + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in - + guard let self = self else { return } - + if shouldRetry { cleanupRequest() self.execute(apiResponseQueue, completion) @@ -157,13 +157,13 @@ open class URLSessionRequestBuilder: RequestBuilder { } } } - + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { onProgressReady?(dataTask.progress) } - + dataTask.resume() - + } catch { apiResponseQueue.async { cleanupRequest() @@ -172,7 +172,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -192,52 +192,52 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is URL.Type: do { - + guard error == nil else { throw DownloadException.responseFailed } - + guard let data = data else { throw DownloadException.responseDataMissing } - + let fileManager = FileManager.default 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: httpResponse.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(.success(Response(response: httpResponse, body: filePath as? T))) - + } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, requestParserError))) } catch let error { completion(.failure(ErrorResponse.error(400, data, error))) } - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + default: - + completion(.success(Response(response: httpResponse, body: data as? T))) } @@ -251,7 +251,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return httpHeaders } - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { guard let contentDisposition = contentDisposition else { return nil @@ -270,7 +270,7 @@ open class URLSessionRequestBuilder: RequestBuilder { filename = contentItem return filename? - .replacingCharacters(in: range, with: "") + .replacingCharacters(in: range, with:"") .replacingOccurrences(of: "\"", with: "") .trimmingCharacters(in: .whitespacesAndNewlines) } @@ -279,7 +279,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getPath(from url: URL) throws -> String { + fileprivate func getPath(from url : URL) throws -> String { guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { throw DownloadException.requestMissingPath @@ -293,7 +293,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { guard let url = urlRequest.url else { throw DownloadException.requestMissingURL @@ -304,7 +304,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } -open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { +open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -324,28 +324,28 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + case is Data.Type: - + completion(.success(Response(response: httpResponse, body: data as? T))) - + default: - + guard let data = data, !data.isEmpty else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) return } - + let decodeResult = CodableHelper.decode(T.self, from: data) - + switch decodeResult { case let .success(decodableObj): completion(.success(Response(response: httpResponse, body: decodableObj))) @@ -356,10 +356,10 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui } } -private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { - +fileprivate class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + var credential: URLCredential? - + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { @@ -402,13 +402,13 @@ public protocol ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest } -private class URLEncoding: ParameterEncoding { - func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { - +fileprivate class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String : Any]?) throws -> URLRequest { + var urlRequest = urlRequest - + guard let parameters = parameters else { return urlRequest } - + guard let url = urlRequest.url else { throw DownloadException.requestMissingURL } @@ -417,12 +417,12 @@ private class URLEncoding: ParameterEncoding { urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) urlRequest.url = urlComponents.url } - + return urlRequest } } -private class FileUploadEncoding: ParameterEncoding { +fileprivate class FileUploadEncoding: ParameterEncoding { let contentTypeForFormPart: (_ fileURL: URL) -> String? @@ -433,13 +433,13 @@ private class FileUploadEncoding: ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { var urlRequest = urlRequest - + guard let parameters = parameters, !parameters.isEmpty else { return urlRequest } - + let boundary = "Boundary-\(UUID().uuidString)" - + urlRequest.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") for (key, value) in parameters { @@ -479,7 +479,7 @@ private class FileUploadEncoding: ParameterEncoding { fatalError("Unprocessable value \(value) with key \(key)") } } - + var body = urlRequest.httpBody.orEmpty body.append("\r\n--\(boundary)--\r\n") @@ -494,7 +494,7 @@ private class FileUploadEncoding: ParameterEncoding { var urlRequest = urlRequest var body = urlRequest.httpBody.orEmpty - + let fileData = try Data(contentsOf: fileURL) let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) @@ -502,7 +502,7 @@ private class FileUploadEncoding: ParameterEncoding { let fileName = fileURL.lastPathComponent // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } @@ -518,20 +518,20 @@ private class FileUploadEncoding: ParameterEncoding { // The value data. body.append(fileData) - + urlRequest.httpBody = body return urlRequest } - + private func configureDataUploadRequest(urlRequest: URLRequest, boundary: String, name: String, data: Data) -> URLRequest { var urlRequest = urlRequest - + var body = urlRequest.httpBody.orEmpty // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/Package.swift b/samples/client/petstore/swift5/urlsessionLibrary/Package.swift index 96dfff54ed..79f6f81887 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/Package.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/Package.swift @@ -14,7 +14,7 @@ let package = Package( // Products define the executables and libraries produced by a package, and make them visible to other packages. .library( name: "PetstoreClient", - targets: ["PetstoreClient"]) + targets: ["PetstoreClient"]), ], dependencies: [ // Dependencies declare other packages that this package depends on. @@ -26,6 +26,6 @@ let package = Package( name: "PetstoreClient", dependencies: [], path: "PetstoreClient/Classes" - ) + ), ] ) diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift index 5b09f95571..2404bc8ffc 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIHelper.swift @@ -7,7 +7,7 @@ import Foundation public struct APIHelper { - public static func rejectNil(_ source: [String: Any?]) -> [String: Any]? { + 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 @@ -20,17 +20,17 @@ public struct APIHelper { return destination } - public static func rejectNilHeaders(_ source: [String: Any?]) -> [String: String] { + 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: ",") + if let collection = item.value as? Array { + 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]? { + public static func convertBoolToString(_ source: [String: Any]?) -> [String:Any]? { guard let source = source else { return nil } @@ -46,15 +46,15 @@ public struct APIHelper { } public static func mapValueToPathItem(_ source: Any) -> Any { - if let collection = source as? [Any?] { + if let collection = source as? Array { return collection.filter({ $0 != nil }).map({"\($0!)"}).joined(separator: ",") } return source } - public static func mapValuesToQueryItems(_ source: [String: Any?]) -> [URLQueryItem]? { + 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?] { + if let collection = item.value as? Array { collection.filter({ $0 != nil }).map({"\($0!)"}).forEach { value in result.append(URLQueryItem(name: item.key, value: value)) } @@ -69,3 +69,4 @@ public struct APIHelper { return destination } } + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift index a5c2d605df..c5d1b9b42d 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs.swift @@ -9,15 +9,15 @@ 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 customHeaders: [String:String] = [:] public static var requestBuilderFactory: RequestBuilderFactory = URLSessionRequestBuilderFactory() public static var apiResponseQueue: DispatchQueue = .main } open class RequestBuilder { var credential: URLCredential? - var headers: [String: String] - public let parameters: [String: Any]? + var headers: [String:String] + public let parameters: [String:Any]? public let isBody: Bool public let method: String public let URLString: String @@ -25,9 +25,9 @@ open class RequestBuilder { /// Optional block to obtain a reference to the request's progress instance when available. /// With the URLSession http client the request's progress only works on iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0. /// If you need to get the request's progress in older OS versions, please use Alamofire http client. - public var onProgressReady: ((Progress) -> Void)? + public var onProgressReady: ((Progress) -> ())? - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + required public init(method: String, URLString: String, parameters: [String:Any]?, isBody: Bool, headers: [String:String] = [:]) { self.method = method self.URLString = URLString self.parameters = parameters @@ -37,7 +37,7 @@ open class RequestBuilder { addHeaders(PetstoreClientAPI.customHeaders) } - open func addHeaders(_ aHeaders: [String: String]) { + open func addHeaders(_ aHeaders:[String:String]) { for (header, value) in aHeaders { headers[header] = value } @@ -60,5 +60,5 @@ open class RequestBuilder { public protocol RequestBuilderFactory { func getNonDecodableBuilder() -> RequestBuilder.Type - func getBuilder() -> RequestBuilder.Type + func getBuilder() -> RequestBuilder.Type } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift index 5bbf323f82..bb3ae71782 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/AnotherFakeAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class AnotherFakeAPI { /** To test special tags @@ -15,7 +17,7 @@ open class AnotherFakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func call123testSpecialTags(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { call123testSpecialTagsWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift index 134d6aea41..d1d81faa33 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class FakeAPI { /** @@ -14,7 +16,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?, _ error: Error?) -> Void)) { + open class func fakeOuterBooleanSerialize(body: Bool? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Bool?,_ error: Error?) -> Void)) { fakeOuterBooleanSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -49,7 +51,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?, _ error: Error?) -> Void)) { + open class func fakeOuterCompositeSerialize(body: OuterComposite? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: OuterComposite?,_ error: Error?) -> Void)) { fakeOuterCompositeSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -84,7 +86,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?, _ error: Error?) -> Void)) { + open class func fakeOuterNumberSerialize(body: Double? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Double?,_ error: Error?) -> Void)) { fakeOuterNumberSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -119,7 +121,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + open class func fakeOuterStringSerialize(body: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { fakeOuterStringSerializeWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -154,7 +156,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testBodyWithFileSchema(body: FileSchemaTestClass, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testBodyWithFileSchemaWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -190,7 +192,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testBodyWithQueryParams(query: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testBodyWithQueryParamsWithRequestBuilder(query: query, body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -229,7 +231,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func testClientModel(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClientModelWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -279,7 +281,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, 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(apiResponseQueue) { result -> Void in switch result { case .success: @@ -316,7 +318,7 @@ open class FakeAPI { 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?] = [ + let formParams: [String:Any?] = [ "integer": integer?.encodeToJSON(), "int32": int32?.encodeToJSON(), "int64": int64?.encodeToJSON(), @@ -335,7 +337,7 @@ open class FakeAPI { let nonNullParameters = APIHelper.rejectNil(formParams) let parameters = APIHelper.convertBoolToString(nonNullParameters) - + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -424,7 +426,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, 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(apiResponseQueue) { result -> Void in switch result { case .success: @@ -452,19 +454,19 @@ open class FakeAPI { 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?] = [ + 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_string_array": enumQueryStringArray?.encodeToJSON(), + "enum_query_string": enumQueryString?.encodeToJSON(), + "enum_query_integer": enumQueryInteger?.encodeToJSON(), "enum_query_double": enumQueryDouble?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -490,7 +492,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - 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, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testGroupParameters(requiredStringGroup: Int, requiredBooleanGroup: Bool, requiredInt64Group: Int64, stringGroup: Int? = nil, booleanGroup: Bool? = nil, int64Group: Int64? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testGroupParametersWithRequestBuilder(requiredStringGroup: requiredStringGroup, requiredBooleanGroup: requiredBooleanGroup, requiredInt64Group: requiredInt64Group, stringGroup: stringGroup, booleanGroup: booleanGroup, int64Group: int64Group).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -516,13 +518,13 @@ open class FakeAPI { 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 - + 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(), + "required_string_group": requiredStringGroup.encodeToJSON(), + "required_int64_group": requiredInt64Group.encodeToJSON(), + "string_group": stringGroup?.encodeToJSON(), "int64_group": int64Group?.encodeToJSON() ]) let nillableHeaders: [String: Any?] = [ @@ -543,7 +545,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testInlineAdditionalProperties(param: [String: String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testInlineAdditionalProperties(param: [String:String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -560,7 +562,7 @@ open class FakeAPI { - parameter param: (body) request body - returns: RequestBuilder */ - open class func testInlineAdditionalPropertiesWithRequestBuilder(param: [String: String]) -> 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) @@ -580,7 +582,7 @@ open class FakeAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func testJsonFormData(param: String, param2: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { testJsonFormDataWithRequestBuilder(param: param, param2: param2).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -601,14 +603,14 @@ open class FakeAPI { open class func testJsonFormDataWithRequestBuilder(param: String, param2: String) -> RequestBuilder { let path = "/fake/jsonFormData" let URLString = PetstoreClientAPI.basePath + path - let formParams: [String: Any?] = [ + 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() diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift index 48cfe7187b..d21c4a49d4 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/FakeClassnameTags123API.swift @@ -7,6 +7,8 @@ import Foundation + + open class FakeClassnameTags123API { /** To test class name in snake case @@ -15,7 +17,7 @@ open class FakeClassnameTags123API { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?, _ error: Error?) -> Void)) { + open class func testClassname(body: Client, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) { testClassnameWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift index c938db7200..f5366f5832 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/PetAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class PetAPI { /** Add a new pet to the store @@ -15,7 +17,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func addPet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { addPetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -55,7 +57,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func deletePet(petId: Int64, apiKey: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deletePetWithRequestBuilder(petId: petId, apiKey: apiKey).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -82,8 +84,8 @@ open class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let nillableHeaders: [String: Any?] = [ "api_key": apiKey?.encodeToJSON() @@ -111,7 +113,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByStatus(status: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByStatusWithRequestBuilder(status: status).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -135,8 +137,8 @@ open class PetAPI { open class func findPetsByStatusWithRequestBuilder(status: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByStatus" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "status": status.encodeToJSON() @@ -155,7 +157,7 @@ open class PetAPI { - parameter completion: completion handler to receive the data and the error objects */ @available(*, deprecated, message: "This operation is deprecated.") - open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?, _ error: Error?) -> Void)) { + open class func findPetsByTags(tags: [String], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [Pet]?,_ error: Error?) -> Void)) { findPetsByTagsWithRequestBuilder(tags: tags).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -180,8 +182,8 @@ open class PetAPI { open class func findPetsByTagsWithRequestBuilder(tags: [String]) -> RequestBuilder<[Pet]> { let path = "/pet/findByTags" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ "tags": tags.encodeToJSON() @@ -199,7 +201,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?, _ error: Error?) -> Void)) { + open class func getPetById(petId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Pet?,_ error: Error?) -> Void)) { getPetByIdWithRequestBuilder(petId: petId).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -226,8 +228,8 @@ open class PetAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -242,7 +244,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func updatePet(body: Pet, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updatePetWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -283,7 +285,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func updatePetWithForm(petId: Int64, name: String? = nil, status: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updatePetWithFormWithRequestBuilder(petId: petId, name: name, status: status).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -311,14 +313,14 @@ open class PetAPI { 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?] = [ + 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() @@ -335,7 +337,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFile(petId: Int64, additionalMetadata: String? = nil, file: URL? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequestBuilder(petId: petId, additionalMetadata: additionalMetadata, file: file).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -363,14 +365,14 @@ open class PetAPI { 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?] = [ + 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() @@ -387,7 +389,7 @@ open class PetAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?, _ error: Error?) -> Void)) { + open class func uploadFileWithRequiredFile(petId: Int64, requiredFile: URL, additionalMetadata: String? = nil, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: ApiResponse?,_ error: Error?) -> Void)) { uploadFileWithRequiredFileWithRequestBuilder(petId: petId, requiredFile: requiredFile, additionalMetadata: additionalMetadata).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -415,14 +417,14 @@ open class PetAPI { 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?] = [ + 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() diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift index a8a83eda39..3848eda85a 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/StoreAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class StoreAPI { /** Delete purchase order by ID @@ -15,7 +17,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func deleteOrder(orderId: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deleteOrderWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -39,8 +41,8 @@ open class StoreAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -54,7 +56,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String: Int]?, _ error: Error?) -> Void)) { + open class func getInventory(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: [String:Int]?,_ error: Error?) -> Void)) { getInventoryWithRequestBuilder().execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -74,14 +76,14 @@ open class StoreAPI { - name: api_key - returns: RequestBuilder<[String:Int]> */ - open class func getInventoryWithRequestBuilder() -> 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) - let requestBuilder: RequestBuilder<[String: Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() + let requestBuilder: RequestBuilder<[String:Int]>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false) } @@ -93,7 +95,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func getOrderById(orderId: Int64, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { getOrderByIdWithRequestBuilder(orderId: orderId).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -117,8 +119,8 @@ open class StoreAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -133,7 +135,7 @@ open class StoreAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?, _ error: Error?) -> Void)) { + open class func placeOrder(body: Order, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Order?,_ error: Error?) -> Void)) { placeOrderWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift index 505ed1b0c5..546166841d 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/APIs/UserAPI.swift @@ -7,6 +7,8 @@ import Foundation + + open class UserAPI { /** Create user @@ -15,7 +17,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func createUser(body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUserWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -52,7 +54,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func createUsersWithArrayInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUsersWithArrayInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -88,7 +90,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func createUsersWithListInput(body: [User], apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { createUsersWithListInputWithRequestBuilder(body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -124,7 +126,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func deleteUser(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { deleteUserWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -148,8 +150,8 @@ open class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -164,7 +166,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?, _ error: Error?) -> Void)) { + open class func getUserByName(username: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: User?,_ error: Error?) -> Void)) { getUserByNameWithRequestBuilder(username: username).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -187,8 +189,8 @@ open class UserAPI { 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 parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder() @@ -204,7 +206,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?, _ error: Error?) -> Void)) { + open class func loginUser(username: String, password: String, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: String?,_ error: Error?) -> Void)) { loginUserWithRequestBuilder(username: username, password: password).execute(apiResponseQueue) { result -> Void in switch result { case let .success(response): @@ -226,11 +228,11 @@ open class UserAPI { open class func loginUserWithRequestBuilder(username: String, password: String) -> RequestBuilder { let path = "/user/login" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + var url = URLComponents(string: URLString) url?.queryItems = APIHelper.mapValuesToQueryItems([ - "username": username.encodeToJSON(), + "username": username.encodeToJSON(), "password": password.encodeToJSON() ]) @@ -245,7 +247,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func logoutUser(apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { logoutUserWithRequestBuilder().execute(apiResponseQueue) { result -> Void in switch result { case .success: @@ -264,8 +266,8 @@ open class UserAPI { open class func logoutUserWithRequestBuilder() -> RequestBuilder { let path = "/user/logout" let URLString = PetstoreClientAPI.basePath + path - let parameters: [String: Any]? = nil - + let parameters: [String:Any]? = nil + let url = URLComponents(string: URLString) let requestBuilder: RequestBuilder.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder() @@ -281,7 +283,7 @@ open class UserAPI { - parameter apiResponseQueue: The queue on which api response is dispatched. - parameter completion: completion handler to receive the data and the error objects */ - open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?, _ error: Error?) -> Void)) { + open class func updateUser(username: String, body: User, apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) { updateUserWithRequestBuilder(username: username, body: body).execute(apiResponseQueue) { result -> Void in switch result { case .success: diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift index ef971ebadc..01b28a4bd4 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/CodableHelper.swift @@ -45,4 +45,4 @@ open class CodableHelper { open class func encode(_ value: T) -> Swift.Result where T: Encodable { return Swift.Result { try self.jsonEncoder.encode(value) } } -} +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift index 627d9adb75..f171525e43 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Configuration.swift @@ -7,10 +7,10 @@ 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. @available(*, unavailable, message: "To set a different date format, use CodableHelper.dateFormatter instead.") public static var dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZ" - -} + +} \ No newline at end of file diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift index 93ed6b90b3..6e279679c6 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Extensions.swift @@ -108,24 +108,24 @@ extension String: CodingKey { extension KeyedEncodingContainerProtocol { - public mutating func encodeArray(_ values: [T], forKey key: Self.Key) throws where T: Encodable { + 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 { + 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 { + 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 { + public mutating func encodeMapIfPresent(_ pairs: [Self.Key: T]?) throws where T : Encodable { if let pairs = pairs { try encodeMap(pairs) } @@ -135,7 +135,7 @@ extension KeyedEncodingContainerProtocol { extension KeyedDecodingContainerProtocol { - public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T: Decodable { + public func decodeArray(_ type: T.Type, forKey key: Self.Key) throws -> [T] where T : Decodable { var tmpArray = [T]() var nestedContainer = try nestedUnkeyedContainer(forKey: key) @@ -147,8 +147,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T: Decodable { - var tmpArray: [T]? + public func decodeArrayIfPresent(_ type: T.Type, forKey key: Self.Key) throws -> [T]? where T : Decodable { + var tmpArray: [T]? = nil if contains(key) { tmpArray = try decodeArray(T.self, forKey: key) @@ -157,8 +157,8 @@ extension KeyedDecodingContainerProtocol { return tmpArray } - public func decodeMap(_ type: T.Type, excludedKeys: Set) throws -> [Self.Key: T] where T: Decodable { - var map: [Self.Key: T] = [:] + 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) { @@ -177,3 +177,5 @@ extension HTTPURLResponse { return Array(200 ..< 300).contains(statusCode) } } + + diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift index b79e9f5e64..08f1ef334d 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/JSONDataEncoding.swift @@ -41,7 +41,7 @@ public struct JSONDataEncoding { } public static func encodingParameters(jsonData: Data?) -> [String: Any]? { - var returnedParams: [String: Any]? + var returnedParams: [String: Any]? = nil if let jsonData = jsonData, !jsonData.isEmpty { var params: [String: Any] = [:] params[jsonDataKey] = jsonData diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift index 02f78ffb47..314f1eff1f 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/JSONEncodingHelper.swift @@ -9,8 +9,8 @@ import Foundation open class JSONEncodingHelper { - open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { - var params: [String: Any]? + open class func encodingParameters(forEncodableObject encodableObj: T?) -> [String: Any]? { + var params: [String: Any]? = nil // Encode the Encodable object if let encodableObj = encodableObj { @@ -27,7 +27,7 @@ open class JSONEncodingHelper { } open class func encodingParameters(forEncodableObject encodableObj: Any?) -> [String: Any]? { - var params: [String: Any]? + var params: [String: Any]? = nil if let encodableObj = encodableObj { do { @@ -41,5 +41,5 @@ open class JSONEncodingHelper { return params } - + } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift index c0542c14c0..11e81ffcc4 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models.swift @@ -10,11 +10,11 @@ protocol JSONEncodable { func encodeToJSON() -> Any } -public enum ErrorResponse: Error { +public enum ErrorResponse : Error { case error(Int, Data?, Error) } -public enum DownloadException: Error { +public enum DownloadException : Error { case responseDataMissing case responseFailed case requestMissing @@ -30,6 +30,7 @@ public enum DecodableRequestBuilderError: Error { case generalError(Error) } + open class Response { public let statusCode: Int public let header: [String: String] @@ -43,7 +44,7 @@ open class Response { public convenience init(response: HTTPURLResponse, body: T?) { let rawHeader = response.allHeaderFields - var header = [String: String]() + var header = [String:String]() for (key, value) in rawHeader { if let key = key.base as? String, let value = value as? String { header[key] = value diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift index 1af0315359..28ca8377b8 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/AdditionalPropertiesClass.swift @@ -7,17 +7,19 @@ import Foundation -public struct AdditionalPropertiesClass: Codable { - public var mapString: [String: String]? - public var mapMapString: [String: [String: String]]? +public struct AdditionalPropertiesClass: Codable { - public init(mapString: [String: String]?, mapMapString: [String: [String: String]]?) { + + 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, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case mapString = "map_string" case mapMapString = "map_map_string" } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift index 5ed9f31e2a..1050d79dbe 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Animal.swift @@ -7,7 +7,9 @@ import Foundation -public struct Animal: Codable { + +public struct Animal: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift index e09b0e9efd..e7bea63f8e 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/AnimalFarm.swift @@ -7,4 +7,5 @@ import Foundation + public typealias AnimalFarm = [Animal] diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift index ec270da890..4d0393b9ba 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ApiResponse.swift @@ -7,7 +7,9 @@ import Foundation -public struct ApiResponse: Codable { + +public struct ApiResponse: Codable { + public var code: Int? public var type: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift index 6c252ed475..1363c96394 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayOfArrayOfNumberOnly: Codable { + +public struct ArrayOfArrayOfNumberOnly: Codable { + public var arrayArrayNumber: [[Double]]? @@ -15,7 +17,7 @@ public struct ArrayOfArrayOfNumberOnly: Codable { self.arrayArrayNumber = arrayArrayNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayArrayNumber = "ArrayArrayNumber" } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift index e84eb5d650..6b8873730c 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayOfNumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayOfNumberOnly: Codable { + +public struct ArrayOfNumberOnly: Codable { + public var arrayNumber: [Double]? @@ -15,7 +17,7 @@ public struct ArrayOfNumberOnly: Codable { self.arrayNumber = arrayNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayNumber = "ArrayNumber" } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift index d2140933d1..64f7c6d9db 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ArrayTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct ArrayTest: Codable { + +public struct ArrayTest: Codable { + public var arrayOfString: [String]? public var arrayArrayOfInteger: [[Int64]]? @@ -19,7 +21,7 @@ public struct ArrayTest: Codable { self.arrayArrayOfModel = arrayArrayOfModel } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case arrayOfString = "array_of_string" case arrayArrayOfInteger = "array_array_of_integer" case arrayArrayOfModel = "array_array_of_model" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift index d1b3b27616..ddb669a590 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Capitalization.swift @@ -7,7 +7,9 @@ import Foundation -public struct Capitalization: Codable { + +public struct Capitalization: Codable { + public var smallCamel: String? public var capitalCamel: String? @@ -26,7 +28,7 @@ public struct Capitalization: Codable { self.ATT_NAME = ATT_NAME } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case smallCamel case capitalCamel = "CapitalCamel" case smallSnake = "small_Snake" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift index 7ab887f311..c4f6e0d488 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Cat.swift @@ -7,7 +7,9 @@ import Foundation -public struct Cat: Codable { + +public struct Cat: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift index a51ad0dffa..7b1d7e32be 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/CatAllOf.swift @@ -7,7 +7,9 @@ import Foundation -public struct CatAllOf: Codable { + +public struct CatAllOf: Codable { + public var declawed: Bool? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift index eb8f7e5e19..3ec00f5ab1 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Category.swift @@ -7,7 +7,9 @@ import Foundation -public struct Category: Codable { + +public struct Category: Codable { + public var id: Int64? public var name: String = "default-name" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift index e2a7d4427a..af030c3dd6 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ClassModel.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model with \"_class\" property */ -public struct ClassModel: Codable { +public struct ClassModel: Codable { + public var _class: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift index 00245ca372..0aae748c76 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Client.swift @@ -7,7 +7,9 @@ import Foundation -public struct Client: Codable { + +public struct Client: Codable { + public var client: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift index 492c122800..198e28b94d 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Dog.swift @@ -7,7 +7,9 @@ import Foundation -public struct Dog: Codable { + +public struct Dog: Codable { + public var className: String public var color: String? = "red" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift index 7786f8acc5..8ff49b2af2 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/DogAllOf.swift @@ -7,7 +7,9 @@ import Foundation -public struct DogAllOf: Codable { + +public struct DogAllOf: Codable { + public var breed: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift index 9844e7c40e..e2d3fa04f9 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumArrays.swift @@ -7,7 +7,9 @@ import Foundation -public struct EnumArrays: Codable { + +public struct EnumArrays: Codable { + public enum JustSymbol: String, Codable, CaseIterable { case greaterThanOrEqualTo = ">=" @@ -25,7 +27,7 @@ public struct EnumArrays: Codable { self.arrayEnum = arrayEnum } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case justSymbol = "just_symbol" case arrayEnum = "array_enum" } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift index d4029d73f8..c2c639ba32 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumClass.swift @@ -7,6 +7,7 @@ import Foundation + public enum EnumClass: String, Codable, CaseIterable { case abc = "_abc" case efg = "-efg" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift index 789f583e1d..a56e1f3638 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/EnumTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct EnumTest: Codable { + +public struct EnumTest: Codable { + public enum EnumString: String, Codable, CaseIterable { case upper = "UPPER" @@ -41,7 +43,7 @@ public struct EnumTest: Codable { self.outerEnum = outerEnum } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case enumString = "enum_string" case enumStringRequired = "enum_string_required" case enumInteger = "enum_integer" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift index abf3ccffc4..773b53b2cb 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/File.swift @@ -8,7 +8,8 @@ import Foundation /** Must be named `File` for test. */ -public struct File: Codable { +public struct File: Codable { + /** Test capitalization */ public var sourceURI: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift index 532f145793..83dc1148cf 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/FileSchemaTestClass.swift @@ -7,7 +7,9 @@ import Foundation -public struct FileSchemaTestClass: Codable { + +public struct FileSchemaTestClass: Codable { + public var file: File? public var files: [File]? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift index 20bd6d103b..bccd3f9fb1 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/FormatTest.swift @@ -7,7 +7,9 @@ import Foundation -public struct FormatTest: Codable { + +public struct FormatTest: Codable { + public var integer: Int? public var int32: Int? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift index 906ddb06fb..566d71a35e 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/HasOnlyReadOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct HasOnlyReadOnly: Codable { + +public struct HasOnlyReadOnly: Codable { + public var bar: String? public var foo: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift index fe13d302cc..80cecab242 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/List.swift @@ -7,7 +7,9 @@ import Foundation -public struct List: Codable { + +public struct List: Codable { + public var _123list: String? @@ -15,7 +17,7 @@ public struct List: Codable { self._123list = _123list } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _123list = "123-list" } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift index 4b6037f378..f0c02de95f 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/MapTest.swift @@ -7,25 +7,27 @@ import Foundation -public struct MapTest: Codable { + +public struct MapTest: Codable { + public enum MapOfEnumString: String, Codable, CaseIterable { case upper = "UPPER" case lower = "lower" } - public var mapMapOfString: [String: [String: String]]? - public var mapOfEnumString: [String: String]? - public var directMap: [String: Bool]? + 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?) { + 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, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case mapMapOfString = "map_map_of_string" case mapOfEnumString = "map_of_enum_string" case directMap = "direct_map" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift index c3deb2f289..710e62a9b5 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/MixedPropertiesAndAdditionalPropertiesClass.swift @@ -7,13 +7,15 @@ import Foundation -public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + +public struct MixedPropertiesAndAdditionalPropertiesClass: Codable { + public var uuid: UUID? public var dateTime: Date? - public var map: [String: Animal]? + public var map: [String:Animal]? - public init(uuid: UUID?, dateTime: Date?, 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/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift index b61db7d6e7..450a53b918 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Model200Response.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model name starting with number */ -public struct Model200Response: Codable { +public struct Model200Response: Codable { + public var name: Int? public var _class: String? @@ -18,7 +19,7 @@ public struct Model200Response: Codable { self._class = _class } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case name case _class = "class" } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift index 8ab4db44b7..6deb69fcd7 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Name.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing model name same as property name */ -public struct Name: Codable { +public struct Name: Codable { + public var name: Int public var snakeCase: Int? @@ -22,7 +23,7 @@ public struct Name: Codable { self._123number = _123number } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case name case snakeCase = "snake_case" case property diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift index 4d1dafcc2c..0c9ee2b7b9 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/NumberOnly.swift @@ -7,7 +7,9 @@ import Foundation -public struct NumberOnly: Codable { + +public struct NumberOnly: Codable { + public var justNumber: Double? @@ -15,7 +17,7 @@ public struct NumberOnly: Codable { self.justNumber = justNumber } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case justNumber = "JustNumber" } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift index 40c30cc860..ab0eac0b30 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Order.swift @@ -7,7 +7,9 @@ import Foundation -public struct Order: Codable { + +public struct Order: Codable { + public enum Status: String, Codable, CaseIterable { case placed = "placed" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift index 18c3a024f1..4a7d227104 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterComposite.swift @@ -7,7 +7,9 @@ import Foundation -public struct OuterComposite: Codable { + +public struct OuterComposite: Codable { + public var myNumber: Double? public var myString: String? @@ -19,7 +21,7 @@ public struct OuterComposite: Codable { self.myBoolean = myBoolean } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case myNumber = "my_number" case myString = "my_string" case myBoolean = "my_boolean" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift index c3b778cbbe..9e6b8d74e8 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/OuterEnum.swift @@ -7,6 +7,7 @@ import Foundation + public enum OuterEnum: String, Codable, CaseIterable { case placed = "placed" case approved = "approved" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift index b9ce0e9332..a973071d6c 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Pet.swift @@ -7,7 +7,9 @@ import Foundation -public struct Pet: Codable { + +public struct Pet: Codable { + public enum Status: String, Codable, CaseIterable { case available = "available" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift index 0acd21fd10..b2a6b7e2b8 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/ReadOnlyFirst.swift @@ -7,7 +7,9 @@ import Foundation -public struct ReadOnlyFirst: Codable { + +public struct ReadOnlyFirst: Codable { + public var bar: String? public var baz: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift index c223f993a6..7e089dcee2 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Return.swift @@ -8,7 +8,8 @@ import Foundation /** Model for testing reserved words */ -public struct Return: Codable { +public struct Return: Codable { + public var _return: Int? @@ -16,7 +17,7 @@ public struct Return: Codable { self._return = _return } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case _return = "return" } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift index 6e8650f76d..e890ef9525 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/SpecialModelName.swift @@ -7,7 +7,9 @@ import Foundation -public struct SpecialModelName: Codable { + +public struct SpecialModelName: Codable { + public var specialPropertyName: Int64? @@ -15,7 +17,7 @@ public struct SpecialModelName: Codable { self.specialPropertyName = specialPropertyName } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case specialPropertyName = "$special[property.name]" } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift index 3f1237fee4..f65ae0623d 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/StringBooleanMap.swift @@ -7,9 +7,12 @@ import Foundation -public struct StringBooleanMap: Codable { - public var additionalProperties: [String: Bool] = [:] +public struct StringBooleanMap: Codable { + + + + public var additionalProperties: [String:Bool] = [:] public subscript(key: String) -> Bool? { get { @@ -42,4 +45,5 @@ public struct StringBooleanMap: Codable { additionalProperties = try container.decodeMap(Bool.self, excludedKeys: nonAdditionalPropertyKeys) } + } diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift index 4dd8a9a9f5..a91b6061bc 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/Tag.swift @@ -7,7 +7,9 @@ import Foundation -public struct Tag: Codable { + +public struct Tag: Codable { + public var id: Int64? public var name: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift index a9e088808e..2d377c3edb 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderDefault.swift @@ -7,7 +7,9 @@ import Foundation -public struct TypeHolderDefault: Codable { + +public struct TypeHolderDefault: Codable { + public var stringItem: String = "what" public var numberItem: Double @@ -23,7 +25,7 @@ public struct TypeHolderDefault: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift index dff4083ae4..e5eb92da69 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/TypeHolderExample.swift @@ -7,7 +7,9 @@ import Foundation -public struct TypeHolderExample: Codable { + +public struct TypeHolderExample: Codable { + public var stringItem: String public var numberItem: Double @@ -23,7 +25,7 @@ public struct TypeHolderExample: Codable { self.arrayItem = arrayItem } - public enum CodingKeys: String, CodingKey, CaseIterable { + public enum CodingKeys: String, CodingKey, CaseIterable { case stringItem = "string_item" case numberItem = "number_item" case integerItem = "integer_item" diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift index 79f271ed73..f70328ca9e 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/Models/User.swift @@ -7,7 +7,9 @@ import Foundation -public struct User: Codable { + +public struct User: Codable { + public var id: Int64? public var username: String? diff --git a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift index 55d0eb4219..22261e2ce9 100644 --- a/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift +++ b/samples/client/petstore/swift5/urlsessionLibrary/PetstoreClient/Classes/OpenAPIs/URLSessionImplementations.swift @@ -14,7 +14,7 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { return URLSessionRequestBuilder.self } - func getBuilder() -> RequestBuilder.Type { + func getBuilder() -> RequestBuilder.Type { return URLSessionDecodableRequestBuilder.self } } @@ -23,16 +23,16 @@ class URLSessionRequestBuilderFactory: RequestBuilderFactory { private var urlSessionStore = SynchronizedDictionary() open class URLSessionRequestBuilder: RequestBuilder { - + private var observation: NSKeyValueObservation? - + deinit { observation?.invalidate() } - + // swiftlint:disable:next weak_delegate fileprivate let sessionDelegate = SessionDelegate() - + /** May be assigned if you want to control the authentication challenges. */ @@ -45,11 +45,11 @@ open class URLSessionRequestBuilder: RequestBuilder { - retry the request. */ public var taskCompletionShouldRetry: ((Data?, URLResponse?, Error?, @escaping (Bool) -> Void) -> Void)? - - required public init(method: String, URLString: String, parameters: [String: Any]?, isBody: Bool, headers: [String: String] = [:]) { + + 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 URLSession configuration. @@ -77,40 +77,40 @@ open class URLSessionRequestBuilder: RequestBuilder { May be overridden by a subclass if you want to control the URLRequest configuration (e.g. to override the cache policy). */ - open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String: String]) throws -> URLRequest { - + open func createURLRequest(urlSession: URLSession, method: HTTPMethod, encoding: ParameterEncoding, headers: [String:String]) throws -> URLRequest { + guard let url = URL(string: URLString) else { throw DownloadException.requestMissingURL } - + var originalRequest = URLRequest(url: url) - + originalRequest.httpMethod = method.rawValue - + buildHeaders().forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + headers.forEach { key, value in originalRequest.setValue(value, forHTTPHeaderField: key) } - + let modifiedRequest = try encoding.encode(originalRequest, with: parameters) - + return modifiedRequest } override open func execute(_ apiResponseQueue: DispatchQueue = PetstoreClientAPI.apiResponseQueue, _ completion: @escaping (_ result: Swift.Result, Error>) -> Void) { - let urlSessionId: String = UUID().uuidString + let urlSessionId:String = UUID().uuidString // Create a new manager for each request to customize its request header let urlSession = createURLSession() urlSessionStore[urlSessionId] = urlSession - + let parameters: [String: Any] = self.parameters ?? [:] - + let fileKeys = parameters.filter { $1 is URL } .map { $0.0 } - + let encoding: ParameterEncoding if fileKeys.count > 0 { encoding = FileUploadEncoding(contentTypeForFormPart: contentTypeForFormPart(fileURL:)) @@ -119,29 +119,29 @@ open class URLSessionRequestBuilder: RequestBuilder { } else { encoding = URLEncoding() } - + guard let xMethod = HTTPMethod(rawValue: method) else { fatalError("Unsuported Http method - \(method)") } - + let cleanupRequest = { urlSessionStore[urlSessionId] = nil self.observation?.invalidate() } - + do { let request = try createURLRequest(urlSession: urlSession, method: xMethod, encoding: encoding, headers: headers) - + let dataTask = urlSession.dataTask(with: request) { [weak self] data, response, error in - + guard let self = self else { return } - + if let taskCompletionShouldRetry = self.taskCompletionShouldRetry { - + taskCompletionShouldRetry(data, response, error) { [weak self] shouldRetry in - + guard let self = self else { return } - + if shouldRetry { cleanupRequest() self.execute(apiResponseQueue, completion) @@ -157,13 +157,13 @@ open class URLSessionRequestBuilder: RequestBuilder { } } } - + if #available(iOS 11.0, macOS 10.13, macCatalyst 13.0, tvOS 11.0, watchOS 4.0, *) { onProgressReady?(dataTask.progress) } - + dataTask.resume() - + } catch { apiResponseQueue.async { cleanupRequest() @@ -172,7 +172,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } } - + fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -192,52 +192,52 @@ open class URLSessionRequestBuilder: RequestBuilder { switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is URL.Type: do { - + guard error == nil else { throw DownloadException.responseFailed } - + guard let data = data else { throw DownloadException.responseDataMissing } - + let fileManager = FileManager.default 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: httpResponse.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(.success(Response(response: httpResponse, body: filePath as? T))) - + } catch let requestParserError as DownloadException { completion(.failure(ErrorResponse.error(400, data, requestParserError))) } catch let error { completion(.failure(ErrorResponse.error(400, data, error))) } - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + default: - + completion(.success(Response(response: httpResponse, body: data as? T))) } @@ -251,7 +251,7 @@ open class URLSessionRequestBuilder: RequestBuilder { return httpHeaders } - fileprivate func getFileName(fromContentDisposition contentDisposition: String?) -> String? { + fileprivate func getFileName(fromContentDisposition contentDisposition : String?) -> String? { guard let contentDisposition = contentDisposition else { return nil @@ -270,7 +270,7 @@ open class URLSessionRequestBuilder: RequestBuilder { filename = contentItem return filename? - .replacingCharacters(in: range, with: "") + .replacingCharacters(in: range, with:"") .replacingOccurrences(of: "\"", with: "") .trimmingCharacters(in: .whitespacesAndNewlines) } @@ -279,7 +279,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getPath(from url: URL) throws -> String { + fileprivate func getPath(from url : URL) throws -> String { guard var path = URLComponents(url: url, resolvingAgainstBaseURL: true)?.path else { throw DownloadException.requestMissingPath @@ -293,7 +293,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } - fileprivate func getURL(from urlRequest: URLRequest) throws -> URL { + fileprivate func getURL(from urlRequest : URLRequest) throws -> URL { guard let url = urlRequest.url else { throw DownloadException.requestMissingURL @@ -304,7 +304,7 @@ open class URLSessionRequestBuilder: RequestBuilder { } -open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { +open class URLSessionDecodableRequestBuilder: URLSessionRequestBuilder { override fileprivate func processRequestResponse(urlRequest: URLRequest, data: Data?, response: URLResponse?, error: Error?, completion: @escaping (_ result: Swift.Result, Error>) -> Void) { if let error = error { @@ -324,28 +324,28 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui switch T.self { case is String.Type: - + let body = data.flatMap { String(data: $0, encoding: .utf8) } ?? "" - + completion(.success(Response(response: httpResponse, body: body as? T))) - + case is Void.Type: - + completion(.success(Response(response: httpResponse, body: nil))) - + case is Data.Type: - + completion(.success(Response(response: httpResponse, body: data as? T))) - + default: - + guard let data = data, !data.isEmpty else { completion(.failure(ErrorResponse.error(httpResponse.statusCode, nil, DecodableRequestBuilderError.emptyDataResponse))) return } - + let decodeResult = CodableHelper.decode(T.self, from: data) - + switch decodeResult { case let .success(decodableObj): completion(.success(Response(response: httpResponse, body: decodableObj))) @@ -356,10 +356,10 @@ open class URLSessionDecodableRequestBuilder: URLSessionRequestBui } } -private class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { - +fileprivate class SessionDelegate: NSObject, URLSessionDelegate, URLSessionDataDelegate { + var credential: URLCredential? - + var taskDidReceiveChallenge: ((URLSession, URLSessionTask, URLAuthenticationChallenge) -> (URLSession.AuthChallengeDisposition, URLCredential?))? func urlSession(_ session: URLSession, task: URLSessionTask, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) { @@ -402,13 +402,13 @@ public protocol ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest } -private class URLEncoding: ParameterEncoding { - func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { - +fileprivate class URLEncoding: ParameterEncoding { + func encode(_ urlRequest: URLRequest, with parameters: [String : Any]?) throws -> URLRequest { + var urlRequest = urlRequest - + guard let parameters = parameters else { return urlRequest } - + guard let url = urlRequest.url else { throw DownloadException.requestMissingURL } @@ -417,12 +417,12 @@ private class URLEncoding: ParameterEncoding { urlComponents.queryItems = APIHelper.mapValuesToQueryItems(parameters) urlRequest.url = urlComponents.url } - + return urlRequest } } -private class FileUploadEncoding: ParameterEncoding { +fileprivate class FileUploadEncoding: ParameterEncoding { let contentTypeForFormPart: (_ fileURL: URL) -> String? @@ -433,13 +433,13 @@ private class FileUploadEncoding: ParameterEncoding { func encode(_ urlRequest: URLRequest, with parameters: [String: Any]?) throws -> URLRequest { var urlRequest = urlRequest - + guard let parameters = parameters, !parameters.isEmpty else { return urlRequest } - + let boundary = "Boundary-\(UUID().uuidString)" - + urlRequest.setValue("multipart/form-data; boundary=\(boundary)", forHTTPHeaderField: "Content-Type") for (key, value) in parameters { @@ -479,7 +479,7 @@ private class FileUploadEncoding: ParameterEncoding { fatalError("Unprocessable value \(value) with key \(key)") } } - + var body = urlRequest.httpBody.orEmpty body.append("\r\n--\(boundary)--\r\n") @@ -494,7 +494,7 @@ private class FileUploadEncoding: ParameterEncoding { var urlRequest = urlRequest var body = urlRequest.httpBody.orEmpty - + let fileData = try Data(contentsOf: fileURL) let mimetype = self.contentTypeForFormPart(fileURL) ?? mimeType(for: fileURL) @@ -502,7 +502,7 @@ private class FileUploadEncoding: ParameterEncoding { let fileName = fileURL.lastPathComponent // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } @@ -518,20 +518,20 @@ private class FileUploadEncoding: ParameterEncoding { // The value data. body.append(fileData) - + urlRequest.httpBody = body return urlRequest } - + private func configureDataUploadRequest(urlRequest: URLRequest, boundary: String, name: String, data: Data) -> URLRequest { var urlRequest = urlRequest - + var body = urlRequest.httpBody.orEmpty // If we already added something then we need an additional newline. - if body.count > 0 { + if (body.count > 0) { body.append("\r\n") } diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/README.md b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/README.md index 151fb2f1a5..f854b9ec11 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/README.md +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/README.md @@ -1,4 +1,4 @@ -## @openapitools/typescript-angular-petstore@1.0.0 +## @openapitools/angular2-typescript-petstore@1.0.0 ### Building @@ -19,7 +19,7 @@ Navigate to the folder of your consuming project and run one of next commands. _published:_ ``` -npm install @openapitools/typescript-angular-petstore@1.0.0 --save +npm install @openapitools/angular2-typescript-petstore@1.0.0 --save ``` _without publishing (not recommended):_ @@ -39,7 +39,7 @@ npm link In your project: ``` -npm link @openapitools/typescript-angular-petstore +npm link @openapitools/angular2-typescript-petstore ``` __Note for Windows users:__ The Angular CLI has troubles to use linked npm packages. @@ -54,7 +54,7 @@ In your Angular project: ``` // without configuring providers -import { ApiModule } from '@openapitools/typescript-angular-petstore'; +import { ApiModule } from '@openapitools/angular2-typescript-petstore'; import { HttpClientModule } from '@angular/common/http'; @NgModule({ @@ -73,7 +73,7 @@ export class AppModule {} ``` // configuring providers -import { ApiModule, Configuration, ConfigurationParameters } from '@openapitools/typescript-angular-petstore'; +import { ApiModule, Configuration, ConfigurationParameters } from '@openapitools/angular2-typescript-petstore'; export function apiConfigFactory (): Configuration => { const params: ConfigurationParameters = { @@ -93,7 +93,7 @@ export class AppModule {} ``` // configuring providers with an authentication service that manages your access tokens -import { ApiModule, Configuration } from '@openapitools/typescript-angular-petstore'; +import { ApiModule, Configuration } from '@openapitools/angular2-typescript-petstore'; @NgModule({ imports: [ ApiModule ], @@ -117,7 +117,7 @@ export class AppModule {} ``` ``` -import { DefaultApi } from '@openapitools/typescript-angular-petstore'; +import { DefaultApi } from '@openapitools/angular2-typescript-petstore'; export class AppComponent { constructor(private apiGateway: DefaultApi) { } @@ -155,7 +155,7 @@ export class AppModule { If different than the generated base path, during app bootstrap, you can provide the base path to your service. ``` -import { BASE_PATH } from '@openapitools/typescript-angular-petstore'; +import { BASE_PATH } from '@openapitools/angular2-typescript-petstore'; bootstrap(AppComponent, [ { provide: BASE_PATH, useValue: 'https://your-web-service.com' }, @@ -164,7 +164,7 @@ bootstrap(AppComponent, [ or ``` -import { BASE_PATH } from '@openapitools/typescript-angular-petstore'; +import { BASE_PATH } from '@openapitools/angular2-typescript-petstore'; @NgModule({ imports: [], @@ -188,7 +188,7 @@ export const environment = { In the src/app/app.module.ts: ``` -import { BASE_PATH } from '@openapitools/typescript-angular-petstore'; +import { BASE_PATH } from '@openapitools/angular2-typescript-petstore'; import { environment } from '../environments/environment'; @NgModule({ diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/package.json b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/package.json index 610e1d2c72..6ac9cd86a1 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/package.json +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/package.json @@ -1,7 +1,7 @@ { - "name": "@openapitools/typescript-angular-petstore", + "name": "@openapitools/angular2-typescript-petstore", "version": "1.0.0", - "description": "OpenAPI client for @openapitools/typescript-angular-petstore", + "description": "OpenAPI client for @openapitools/angular2-typescript-petstore", "author": "OpenAPI-Generator Contributors", "keywords": [ "openapi-client", diff --git a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator-ignore b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator-ignore index 7484ee590a..cabbe3494d 100644 --- a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator-ignore +++ b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator-ignore @@ -1,23 +1,3 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +pom.xml -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator-ignore b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator-ignore index 7484ee590a..cabbe3494d 100644 --- a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator-ignore +++ b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator-ignore @@ -1,23 +1,3 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +pom.xml -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator-ignore b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator-ignore index 7484ee590a..cabbe3494d 100644 --- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator-ignore +++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator-ignore @@ -1,23 +1,3 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +pom.xml -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator-ignore b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator-ignore index 7484ee590a..cabbe3494d 100644 --- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator-ignore +++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator-ignore @@ -1,23 +1,3 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +pom.xml -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator-ignore b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator-ignore index 7484ee590a..cabbe3494d 100644 --- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator-ignore +++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator-ignore @@ -1,23 +1,3 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +pom.xml -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/typescript-fetch/tests/default/.openapi-generator-ignore b/samples/client/petstore/typescript-fetch/tests/default/.openapi-generator-ignore new file mode 100644 index 0000000000..cabbe3494d --- /dev/null +++ b/samples/client/petstore/typescript-fetch/tests/default/.openapi-generator-ignore @@ -0,0 +1,3 @@ +# OpenAPI Generator Ignore +pom.xml + diff --git a/samples/openapi3/client/petstore/go-experimental/go-petstore/.openapi-generator/FILES b/samples/openapi3/client/petstore/go-experimental/go-petstore/.openapi-generator/FILES index 3c0d34c4ed..c90528f4b2 100644 --- a/samples/openapi3/client/petstore/go-experimental/go-petstore/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/go-experimental/go-petstore/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/FILES b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/FILES index 6e1550482f..cc725b6d4d 100644 --- a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator-ignore b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator-ignore index 7484ee590a..16d6986fc2 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator-ignore +++ b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator-ignore @@ -1,23 +1,4 @@ # 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 +# These are "live" test files which should not be overwritten +src/test/java/org/openapitools/client/JSONTest.java +src/test/java/org/openapitools/client/JSONComposedSchemaTest.java diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/FILES b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/FILES index b82bd6a172..c05e6308f6 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore .travis.yml README.md api/openapi.yaml diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md index 9c912ded09..406019f765 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md +++ b/samples/openapi3/client/petstore/java/jersey2-java8/docs/FakeApi.md @@ -670,7 +670,7 @@ Name | Type | Description | Notes **string** | **String**| None | [optional] **binary** | **File**| None | [optional] **date** | **LocalDate**| None | [optional] - **dateTime** | **OffsetDateTime**| None | [optional] [default to OffsetDateTime.parse("2010-02-01T17:20:10.111110+08:00[Asia/Hong_Kong]", java.time.format.DateTimeFormatter.ISO_ZONED_DATE_TIME.withZone(java.time.ZoneId.systemDefault()))] + **dateTime** | **OffsetDateTime**| None | [optional] [default to OffsetDateTime.parse("2010-02-01T09:20:10.111110Z[UTC]", java.time.format.DateTimeFormatter.ISO_ZONED_DATE_TIME.withZone(java.time.ZoneId.systemDefault()))] **password** | **String**| None | [optional] **paramCallback** | **String**| None | [optional] diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java index eed4c31859..95e2aed6ac 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/api/FakeApi.java @@ -639,7 +639,7 @@ public class FakeApi { * @param string None (optional) * @param binary None (optional) * @param date None (optional) - * @param dateTime None (optional, default to OffsetDateTime.parse("2010-02-01T17:20:10.111110+08:00[Asia/Hong_Kong]", java.time.format.DateTimeFormatter.ISO_ZONED_DATE_TIME.withZone(java.time.ZoneId.systemDefault()))) + * @param dateTime None (optional, default to OffsetDateTime.parse("2010-02-01T09:20:10.111110Z[UTC]", java.time.format.DateTimeFormatter.ISO_ZONED_DATE_TIME.withZone(java.time.ZoneId.systemDefault()))) * @param password None (optional) * @param paramCallback None (optional) * @throws ApiException if fails to make API call @@ -668,7 +668,7 @@ public class FakeApi { * @param string None (optional) * @param binary None (optional) * @param date None (optional) - * @param dateTime None (optional, default to OffsetDateTime.parse("2010-02-01T17:20:10.111110+08:00[Asia/Hong_Kong]", java.time.format.DateTimeFormatter.ISO_ZONED_DATE_TIME.withZone(java.time.ZoneId.systemDefault()))) + * @param dateTime None (optional, default to OffsetDateTime.parse("2010-02-01T09:20:10.111110Z[UTC]", java.time.format.DateTimeFormatter.ISO_ZONED_DATE_TIME.withZone(java.time.ZoneId.systemDefault()))) * @param password None (optional) * @param paramCallback None (optional) * @return ApiResponse<Void> @@ -1231,7 +1231,7 @@ if (param2 != null) localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "pipe", pipe)); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "ioutil", ioutil)); - localVarQueryParams.addAll(apiClient.parameterToPairs("space", "http", http)); + localVarQueryParams.addAll(apiClient.parameterToPairs("ssv", "http", http)); localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "url", url)); localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "context", context)); diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java index f66ee00188..a0570d0445 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/FormatTest.java @@ -339,7 +339,7 @@ public class FormatTest { * Get date * @return date **/ - @ApiModelProperty(example = "Sun Feb 02 08:00:00 HKT 2020", required = true, value = "") + @ApiModelProperty(example = "Sun Feb 02 00:00:00 UTC 2020", required = true, value = "") @JsonProperty(JSON_PROPERTY_DATE) @JsonInclude(value = JsonInclude.Include.ALWAYS) diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/InlineObject3.java b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/InlineObject3.java index 7cf78a40b3..deac7f8d41 100644 --- a/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/InlineObject3.java +++ b/samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/model/InlineObject3.java @@ -82,7 +82,7 @@ public class InlineObject3 { private LocalDate date; public static final String JSON_PROPERTY_DATE_TIME = "dateTime"; - private OffsetDateTime dateTime = OffsetDateTime.parse("2010-02-01T17:20:10.111110+08:00[Asia/Hong_Kong]", java.time.format.DateTimeFormatter.ISO_ZONED_DATE_TIME.withZone(java.time.ZoneId.systemDefault())); + private OffsetDateTime dateTime = OffsetDateTime.parse("2010-02-01T09:20:10.111110Z[UTC]", java.time.format.DateTimeFormatter.ISO_ZONED_DATE_TIME.withZone(java.time.ZoneId.systemDefault())); public static final String JSON_PROPERTY_PASSWORD = "password"; private String password; diff --git a/samples/openapi3/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES b/samples/openapi3/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES index 8641ec86fb..6c0c0f87b5 100644 --- a/samples/openapi3/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES +++ b/samples/openapi3/client/petstore/php/OpenAPIClient-php/.openapi-generator/FILES @@ -122,59 +122,3 @@ lib/Model/Tag.php lib/Model/User.php lib/ObjectSerializer.php phpunit.xml.dist -test/Api/AnotherFakeApiTest.php -test/Api/DefaultApiTest.php -test/Api/FakeApiTest.php -test/Api/FakeClassnameTags123ApiTest.php -test/Api/PetApiTest.php -test/Api/StoreApiTest.php -test/Api/UserApiTest.php -test/Model/AdditionalPropertiesClassTest.php -test/Model/AnimalTest.php -test/Model/ApiResponseTest.php -test/Model/ArrayOfArrayOfNumberOnlyTest.php -test/Model/ArrayOfNumberOnlyTest.php -test/Model/ArrayTestTest.php -test/Model/CapitalizationTest.php -test/Model/CatAllOfTest.php -test/Model/CatTest.php -test/Model/CategoryTest.php -test/Model/ClassModelTest.php -test/Model/ClientTest.php -test/Model/DogAllOfTest.php -test/Model/DogTest.php -test/Model/EnumArraysTest.php -test/Model/EnumClassTest.php -test/Model/EnumTestTest.php -test/Model/FileSchemaTestClassTest.php -test/Model/FileTest.php -test/Model/FooTest.php -test/Model/FormatTestTest.php -test/Model/HasOnlyReadOnlyTest.php -test/Model/HealthCheckResultTest.php -test/Model/InlineObject1Test.php -test/Model/InlineObject2Test.php -test/Model/InlineObject3Test.php -test/Model/InlineObject4Test.php -test/Model/InlineObject5Test.php -test/Model/InlineObjectTest.php -test/Model/InlineResponseDefaultTest.php -test/Model/MapTestTest.php -test/Model/MixedPropertiesAndAdditionalPropertiesClassTest.php -test/Model/Model200ResponseTest.php -test/Model/ModelListTest.php -test/Model/ModelReturnTest.php -test/Model/NameTest.php -test/Model/NullableClassTest.php -test/Model/NumberOnlyTest.php -test/Model/OrderTest.php -test/Model/OuterCompositeTest.php -test/Model/OuterEnumDefaultValueTest.php -test/Model/OuterEnumIntegerDefaultValueTest.php -test/Model/OuterEnumIntegerTest.php -test/Model/OuterEnumTest.php -test/Model/PetTest.php -test/Model/ReadOnlyFirstTest.php -test/Model/SpecialModelNameTest.php -test/Model/TagTest.php -test/Model/UserTest.php diff --git a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator-ignore b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator-ignore index 7484ee590a..cabbe3494d 100644 --- a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator-ignore +++ b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator-ignore @@ -1,23 +1,3 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +pom.xml -# 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/server/petstore/java-play-framework-controller-only/.openapi-generator-ignore b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator-ignore index 7484ee590a..c0ce5522d2 100644 --- a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator-ignore +++ b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator-ignore @@ -1,23 +1,2 @@ # 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 +pom.xml diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator-ignore b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator-ignore index 7484ee590a..cabbe3494d 100644 --- a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator-ignore +++ b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator-ignore @@ -1,23 +1,3 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +pom.xml -# 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/server/petstore/java-play-framework-no-bean-validation/.openapi-generator-ignore b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator-ignore index 7484ee590a..cabbe3494d 100644 --- a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator-ignore +++ b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator-ignore @@ -1,23 +1,3 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +pom.xml -# 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/server/petstore/java-play-framework-no-exception-handling/.openapi-generator-ignore b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator-ignore index 7484ee590a..cabbe3494d 100644 --- a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator-ignore +++ b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator-ignore @@ -1,23 +1,3 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +pom.xml -# 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/server/petstore/java-play-framework-no-interface/.openapi-generator-ignore b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator-ignore index 7484ee590a..cabbe3494d 100644 --- a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator-ignore +++ b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator-ignore @@ -1,23 +1,3 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +pom.xml -# 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/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator-ignore b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator-ignore index 7484ee590a..cabbe3494d 100644 --- a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator-ignore +++ b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator-ignore @@ -1,23 +1,3 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +pom.xml -# 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/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator-ignore b/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator-ignore index 7484ee590a..cabbe3494d 100644 --- a/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator-ignore +++ b/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator-ignore @@ -1,23 +1,3 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +pom.xml -# 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/server/petstore/java-play-framework/.openapi-generator-ignore b/samples/server/petstore/java-play-framework/.openapi-generator-ignore index 7484ee590a..cabbe3494d 100644 --- a/samples/server/petstore/java-play-framework/.openapi-generator-ignore +++ b/samples/server/petstore/java-play-framework/.openapi-generator-ignore @@ -1,23 +1,3 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +pom.xml -# 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/server/petstore/jaxrs-cxf-test-data/.openapi-generator/FILES b/samples/server/petstore/jaxrs-cxf-test-data/.openapi-generator/FILES new file mode 100644 index 0000000000..b5999c424f --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-test-data/.openapi-generator/FILES @@ -0,0 +1,68 @@ +.openapi-generator-ignore +pom.xml +readme.md +src/gen/java/org/openapitools/api/AnotherFakeApi.java +src/gen/java/org/openapitools/api/FakeApi.java +src/gen/java/org/openapitools/api/FakeClassnameTags123Api.java +src/gen/java/org/openapitools/api/PetApi.java +src/gen/java/org/openapitools/api/StoreApi.java +src/gen/java/org/openapitools/api/UserApi.java +src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java +src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java +src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java +src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java +src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java +src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java +src/gen/java/org/openapitools/model/AdditionalPropertiesString.java +src/gen/java/org/openapitools/model/Animal.java +src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java +src/gen/java/org/openapitools/model/ArrayTest.java +src/gen/java/org/openapitools/model/BigCat.java +src/gen/java/org/openapitools/model/BigCatAllOf.java +src/gen/java/org/openapitools/model/Capitalization.java +src/gen/java/org/openapitools/model/Cat.java +src/gen/java/org/openapitools/model/CatAllOf.java +src/gen/java/org/openapitools/model/Category.java +src/gen/java/org/openapitools/model/ClassModel.java +src/gen/java/org/openapitools/model/Client.java +src/gen/java/org/openapitools/model/Dog.java +src/gen/java/org/openapitools/model/DogAllOf.java +src/gen/java/org/openapitools/model/EnumArrays.java +src/gen/java/org/openapitools/model/EnumClass.java +src/gen/java/org/openapitools/model/EnumTest.java +src/gen/java/org/openapitools/model/FileSchemaTestClass.java +src/gen/java/org/openapitools/model/FormatTest.java +src/gen/java/org/openapitools/model/HasOnlyReadOnly.java +src/gen/java/org/openapitools/model/MapTest.java +src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +src/gen/java/org/openapitools/model/Model200Response.java +src/gen/java/org/openapitools/model/ModelApiResponse.java +src/gen/java/org/openapitools/model/ModelReturn.java +src/gen/java/org/openapitools/model/Name.java +src/gen/java/org/openapitools/model/NumberOnly.java +src/gen/java/org/openapitools/model/Order.java +src/gen/java/org/openapitools/model/OuterComposite.java +src/gen/java/org/openapitools/model/OuterEnum.java +src/gen/java/org/openapitools/model/Pet.java +src/gen/java/org/openapitools/model/ReadOnlyFirst.java +src/gen/java/org/openapitools/model/SpecialModelName.java +src/gen/java/org/openapitools/model/Tag.java +src/gen/java/org/openapitools/model/TypeHolderDefault.java +src/gen/java/org/openapitools/model/TypeHolderExample.java +src/gen/java/org/openapitools/model/User.java +src/gen/java/org/openapitools/model/XmlItem.java +src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java +src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +src/main/java/org/openapitools/api/impl/FakeClassnameTags123ApiServiceImpl.java +src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java +src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +src/main/resources/ApplicationContext.xml +src/main/resources/test-data.json +src/main/webapp/WEB-INF/context.xml +src/main/webapp/WEB-INF/web.xml +src/test/java/org/openapitools/api/SpringBootApplication.java +src/test/resources/application.properties +test-data-control.json diff --git a/samples/server/petstore/jaxrs-cxf-test-data/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-test-data/.openapi-generator/VERSION index afa6365606..d99e7162d0 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/.openapi-generator/VERSION +++ b/samples/server/petstore/jaxrs-cxf-test-data/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.0-SNAPSHOT \ No newline at end of file +5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/server/petstore/jaxrs-cxf-test-data/pom.xml b/samples/server/petstore/jaxrs-cxf-test-data/pom.xml index 9cc072a075..649cf9d0e9 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/pom.xml +++ b/samples/server/petstore/jaxrs-cxf-test-data/pom.xml @@ -1,9 +1,9 @@ 4.0.0 org.openapitools - jaxrs-cxf-petstore-server-test-data + cxf-test-data war - jaxrs-cxf-petstore-server-test-data + cxf-test-data This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ 1.0.0 @@ -233,7 +233,7 @@ org.openapitools openapi-generator - 4.0.0-SNAPSHOT + 5.0.0-SNAPSHOT @@ -260,7 +260,7 @@ 9.2.9.v20150224 1.1.0.Final 3.3.0 - 2.9.8 + 2.9.9 UTF-8 diff --git a/samples/server/petstore/jaxrs-cxf-test-data/readme.md b/samples/server/petstore/jaxrs-cxf-test-data/readme.md index 60afd53a0d..fdd92b91bf 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/readme.md +++ b/samples/server/petstore/jaxrs-cxf-test-data/readme.md @@ -1,4 +1,3 @@ - # JAX-RS CXF 3 server application ## Supported features @@ -8,29 +7,27 @@ * Swagger-UI can be included as Web-Jar automatically * WADL is accessible (CXF WADL-Generator) * Unit-tests include Gzip-Interceptors for demonstration +* Options for generating a functional mock server returning static responses - -## Urls to access the REST API -### Urls for Spring Boot +## URLs to access the REST API +### URLs for Spring Boot * Available services listing -http://localhost:8080/ + http://localhost:8080/ -* Swagger API +* OpenAPI http://localhost:8080/services/openapi.json * CXF WADL http://localhost:8080/services?_wadl -### Urls if deployed to an AS +### URLs if deployed to an Application Server * Available services listing -http://localhost:8080/swagger-cxf-server/rest/services/ + http://localhost:8080/swagger-cxf-server/rest/services/ -* Swagger API +* OpenAPI http://localhost:8080/swagger-cxf-server/rest/services/swagger.json * CXF WADL http://localhost:8080/swagger-cxf-server/rest/services?_wadl - - diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/api/FakeApi.java index 34d3f595cb..4d49b7da44 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/api/FakeApi.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/api/FakeApi.java @@ -73,7 +73,7 @@ public interface FakeApi { @POST @Path("/fake/outer/number") - @Consumes({ "application/json" }) + @Consumes({ "text/plain" }) @Produces({ "*/*" }) @ApiOperation(value = "", tags={ "fake", }) @ApiResponses(value = { @@ -121,15 +121,15 @@ public interface FakeApi { public Client testClientModel(@Valid Client body); /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * */ @POST @Path("/fake") @Consumes({ "application/x-www-form-urlencoded" }) - @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 ", tags={ "fake", }) + @ApiOperation(value = "Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트", tags={ "fake", }) @ApiResponses(value = { @ApiResponse(code = 400, message = "Invalid username supplied"), @ApiResponse(code = 404, message = "User not found") }) @@ -182,9 +182,16 @@ public interface FakeApi { @GET @Path("/fake/jsonFormData") @Consumes({ "application/x-www-form-urlencoded" }) - @ApiOperation(value = "test json serialization of form data", tags={ "fake" }) + @ApiOperation(value = "test json serialization of form data", tags={ "fake", }) @ApiResponses(value = { @ApiResponse(code = 200, message = "successful operation") }) public void testJsonFormData(@Multipart(value = "param") String param, @Multipart(value = "param2") String param2); + + @PUT + @Path("/fake/test-query-paramters") + @ApiOperation(value = "", tags={ "fake" }) + @ApiResponses(value = { + @ApiResponse(code = 200, message = "Success") }) + public void testQueryParameterCollectionFormat(@QueryParam("pipe") @NotNull List pipe, @QueryParam("ioutil") @NotNull List ioutil, @QueryParam("http") @NotNull List http, @QueryParam("url") @NotNull List url, @QueryParam("context") @NotNull List context); } diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/api/PetApi.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/api/PetApi.java index 0499feff7e..8a6246e339 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/api/PetApi.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/api/PetApi.java @@ -6,6 +6,7 @@ import java.util.List; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import java.util.Set; import java.io.InputStream; import java.io.OutputStream; @@ -85,9 +86,9 @@ public interface PetApi { @Produces({ "application/xml", "application/json" }) @ApiOperation(value = "Finds Pets by tags", tags={ "pet", }) @ApiResponses(value = { - @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "List"), + @ApiResponse(code = 200, message = "successful operation", response = Pet.class, responseContainer = "Set"), @ApiResponse(code = 400, message = "Invalid tag value") }) - public List findPetsByTags(@QueryParam("tags") @NotNull List tags); + public Set findPetsByTags(@QueryParam("tags") @NotNull Set tags); /** * Find pet by ID diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java index 8d1b429f42..f17083be06 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesAnyType.java @@ -16,6 +16,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class AdditionalPropertiesAnyType extends HashMap { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java index 067459cbce..8c0fbc0652 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesArray.java @@ -17,6 +17,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class AdditionalPropertiesArray extends HashMap { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java index c4a6acccab..6fff7947b8 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesBoolean.java @@ -16,6 +16,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class AdditionalPropertiesBoolean extends HashMap { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index 467dd334dd..b8326103de 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -18,6 +18,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class AdditionalPropertiesClass { @ApiModelProperty(value = "") @@ -50,16 +51,13 @@ public class AdditionalPropertiesClass { private Map> mapMapAnytype = null; @ApiModelProperty(value = "") - @Valid - private Object anytype1 = null; + private Object anytype1; @ApiModelProperty(value = "") - @Valid - private Object anytype2 = null; + private Object anytype2; @ApiModelProperty(value = "") - @Valid - private Object anytype3 = null; + private Object anytype3; /** * Get mapString * @return mapString diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java index 9791c19d3e..83e8a3130d 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesInteger.java @@ -16,6 +16,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class AdditionalPropertiesInteger extends HashMap { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java index c98d535e07..3959c6a0d7 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesNumber.java @@ -17,6 +17,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class AdditionalPropertiesNumber extends HashMap { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java index 949eec2955..efbae205e2 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesObject.java @@ -16,6 +16,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class AdditionalPropertiesObject extends HashMap { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java index cdc65a2c3a..91537d4689 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/AdditionalPropertiesString.java @@ -16,6 +16,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class AdditionalPropertiesString extends HashMap { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Animal.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Animal.java index 1da3838e19..b0fab9fb54 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Animal.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Animal.java @@ -20,7 +20,9 @@ import com.fasterxml.jackson.annotation.JsonProperty; @JsonSubTypes({ @JsonSubTypes.Type(value = Dog.class, name = "Dog"), @JsonSubTypes.Type(value = Cat.class, name = "Cat"), + @JsonSubTypes.Type(value = BigCat.class, name = "BigCat"), }) + public class Animal { @ApiModelProperty(required = true, value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java index b30ac2cddb..0593a09548 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ArrayOfArrayOfNumberOnly.java @@ -17,6 +17,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class ArrayOfArrayOfNumberOnly { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java index 89edc0079e..ce65055a7f 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ArrayOfNumberOnly.java @@ -17,6 +17,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class ArrayOfNumberOnly { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ArrayTest.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ArrayTest.java index 88d5c73521..b8781d69cb 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ArrayTest.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ArrayTest.java @@ -17,6 +17,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class ArrayTest { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/BigCat.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/BigCat.java new file mode 100644 index 0000000000..66ef35290b --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/BigCat.java @@ -0,0 +1,104 @@ +package org.openapitools.model; + +import org.openapitools.model.BigCatAllOf; +import org.openapitools.model.Cat; +import javax.validation.constraints.*; +import javax.validation.Valid; + +import io.swagger.annotations.ApiModelProperty; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + + +public class BigCat extends Cat { + +@XmlType(name="KindEnum") +@XmlEnum(String.class) +public enum KindEnum { + + @XmlEnumValue("lions") @JsonProperty("lions") LIONS(String.valueOf("lions")), + @XmlEnumValue("tigers") @JsonProperty("tigers") TIGERS(String.valueOf("tigers")), + @XmlEnumValue("leopards") @JsonProperty("leopards") LEOPARDS(String.valueOf("leopards")), + @XmlEnumValue("jaguars") @JsonProperty("jaguars") JAGUARS(String.valueOf("jaguars")); + + private String value; + + KindEnum (String v) { + value = v; + } + + public String value() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + + @ApiModelProperty(value = "") + private KindEnum kind; + /** + * Get kind + * @return kind + */ + @JsonProperty("kind") + public String getKind() { + return kind == null ? null : kind.value(); + } + + /** + * Sets the kind property. + */ + public void setKind(KindEnum kind) { + this.kind = kind; + } + + /** + * Sets the kind property. + */ + public BigCat kind(KindEnum kind) { + this.kind = kind; + return this; + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCat {\n"); + sb.append(" ").append(toIndentedString(super.toString())).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/BigCatAllOf.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/BigCatAllOf.java new file mode 100644 index 0000000000..41fe374985 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/BigCatAllOf.java @@ -0,0 +1,102 @@ +package org.openapitools.model; + +import javax.validation.constraints.*; +import javax.validation.Valid; + +import io.swagger.annotations.ApiModelProperty; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + + +public class BigCatAllOf { + +@XmlType(name="KindEnum") +@XmlEnum(String.class) +public enum KindEnum { + + @XmlEnumValue("lions") @JsonProperty("lions") LIONS(String.valueOf("lions")), + @XmlEnumValue("tigers") @JsonProperty("tigers") TIGERS(String.valueOf("tigers")), + @XmlEnumValue("leopards") @JsonProperty("leopards") LEOPARDS(String.valueOf("leopards")), + @XmlEnumValue("jaguars") @JsonProperty("jaguars") JAGUARS(String.valueOf("jaguars")); + + private String value; + + KindEnum (String v) { + value = v; + } + + public String value() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static KindEnum fromValue(String value) { + for (KindEnum b : KindEnum.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } +} + + @ApiModelProperty(value = "") + private KindEnum kind; + /** + * Get kind + * @return kind + */ + @JsonProperty("kind") + public String getKind() { + return kind == null ? null : kind.value(); + } + + /** + * Sets the kind property. + */ + public void setKind(KindEnum kind) { + this.kind = kind; + } + + /** + * Sets the kind property. + */ + public BigCatAllOf kind(KindEnum kind) { + this.kind = kind; + return this; + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BigCatAllOf {\n"); + + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Capitalization.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Capitalization.java index 899f4b5e5d..74fbb2eb69 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Capitalization.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Capitalization.java @@ -14,6 +14,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class Capitalization { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Cat.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Cat.java index 83b49a63e3..9a9a80e5c6 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Cat.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Cat.java @@ -1,6 +1,7 @@ package org.openapitools.model; import org.openapitools.model.Animal; +import org.openapitools.model.CatAllOf; import javax.validation.constraints.*; import javax.validation.Valid; @@ -15,6 +16,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class Cat extends Animal { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/CatAllOf.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/CatAllOf.java new file mode 100644 index 0000000000..1f1b1313de --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/CatAllOf.java @@ -0,0 +1,68 @@ +package org.openapitools.model; + +import javax.validation.constraints.*; +import javax.validation.Valid; + +import io.swagger.annotations.ApiModelProperty; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + + +public class CatAllOf { + + @ApiModelProperty(value = "") + private Boolean declawed; + /** + * Get declawed + * @return declawed + */ + @JsonProperty("declawed") + public Boolean getDeclawed() { + return declawed; + } + + /** + * Sets the declawed property. + */ + public void setDeclawed(Boolean declawed) { + this.declawed = declawed; + } + + /** + * Sets the declawed property. + */ + public CatAllOf declawed(Boolean declawed) { + this.declawed = declawed; + return this; + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CatAllOf {\n"); + + sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Category.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Category.java index c7bfb3b253..d210c55b9e 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Category.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Category.java @@ -14,6 +14,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class Category { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ClassModel.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ClassModel.java index 105ecc2e7c..7e8fb51d09 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ClassModel.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ClassModel.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * Model for testing model with \"_class\" property */ @ApiModel(description="Model for testing model with \"_class\" property") + public class ClassModel { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Client.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Client.java index dc7323ea41..ce2f2f0d93 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Client.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Client.java @@ -14,6 +14,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class Client { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Dog.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Dog.java index e9d8e2ba54..01b3ec86bb 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Dog.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Dog.java @@ -1,6 +1,7 @@ package org.openapitools.model; import org.openapitools.model.Animal; +import org.openapitools.model.DogAllOf; import javax.validation.constraints.*; import javax.validation.Valid; @@ -15,6 +16,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class Dog extends Animal { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/DogAllOf.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/DogAllOf.java new file mode 100644 index 0000000000..46cd4a6004 --- /dev/null +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/DogAllOf.java @@ -0,0 +1,68 @@ +package org.openapitools.model; + +import javax.validation.constraints.*; +import javax.validation.Valid; + +import io.swagger.annotations.ApiModelProperty; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlEnum; +import javax.xml.bind.annotation.XmlEnumValue; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; + + +public class DogAllOf { + + @ApiModelProperty(value = "") + private String breed; + /** + * Get breed + * @return breed + */ + @JsonProperty("breed") + public String getBreed() { + return breed; + } + + /** + * Sets the breed property. + */ + public void setBreed(String breed) { + this.breed = breed; + } + + /** + * Sets the breed property. + */ + public DogAllOf breed(String breed) { + this.breed = breed; + return this; + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DogAllOf {\n"); + + sb.append(" breed: ").append(toIndentedString(breed)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private static String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } +} + diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/EnumArrays.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/EnumArrays.java index 2104f50c07..42b40db73f 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/EnumArrays.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/EnumArrays.java @@ -16,6 +16,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class EnumArrays { @XmlType(name="JustSymbolEnum") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/EnumTest.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/EnumTest.java index a8cce324ae..6b1538b66a 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/EnumTest.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/EnumTest.java @@ -15,6 +15,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class EnumTest { @XmlType(name="EnumStringEnum") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/FileSchemaTestClass.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/FileSchemaTestClass.java index 8d3da8aa03..f337973b30 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/FileSchemaTestClass.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/FileSchemaTestClass.java @@ -16,11 +16,12 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class FileSchemaTestClass { @ApiModelProperty(value = "") @Valid - private java.io.File file = null; + private java.io.File file; @ApiModelProperty(value = "") @Valid diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/FormatTest.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/FormatTest.java index c354e724d5..b75f5241ee 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/FormatTest.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/FormatTest.java @@ -19,6 +19,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class FormatTest { @ApiModelProperty(value = "") @@ -62,6 +63,9 @@ public class FormatTest { @ApiModelProperty(required = true, value = "") private String password; + + @ApiModelProperty(value = "") + private BigDecimal bigDecimal; /** * Get integer * minimum: 10 @@ -388,6 +392,30 @@ public class FormatTest { return this; } + /** + * Get bigDecimal + * @return bigDecimal + */ + @JsonProperty("BigDecimal") + public BigDecimal getBigDecimal() { + return bigDecimal; + } + + /** + * Sets the bigDecimal property. + */ + public void setBigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + } + + /** + * Sets the bigDecimal property. + */ + public FormatTest bigDecimal(BigDecimal bigDecimal) { + this.bigDecimal = bigDecimal; + return this; + } + @Override public String toString() { @@ -407,6 +435,7 @@ public class FormatTest { sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n"); sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n"); sb.append(" password: ").append(toIndentedString(password)).append("\n"); + sb.append(" bigDecimal: ").append(toIndentedString(bigDecimal)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java index e615164235..3c7f368696 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/HasOnlyReadOnly.java @@ -14,6 +14,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class HasOnlyReadOnly { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/MapTest.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/MapTest.java index 8714ac4ada..a5fe34ef01 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/MapTest.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/MapTest.java @@ -3,7 +3,6 @@ package org.openapitools.model; import java.util.HashMap; import java.util.List; import java.util.Map; -import org.openapitools.model.StringBooleanMap; import javax.validation.constraints.*; import javax.validation.Valid; @@ -18,6 +17,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class MapTest { @ApiModelProperty(value = "") @@ -63,8 +63,7 @@ public enum InnerEnum { private Map directMap = null; @ApiModelProperty(value = "") - @Valid - private StringBooleanMap indirectMap = new StringBooleanMap(); + private Map indirectMap = null; /** * Get mapMapOfString * @return mapMapOfString @@ -166,25 +165,33 @@ public enum InnerEnum { * @return indirectMap */ @JsonProperty("indirect_map") - public StringBooleanMap getIndirectMap() { + public Map getIndirectMap() { return indirectMap; } /** * Sets the indirectMap property. */ - public void setIndirectMap(StringBooleanMap indirectMap) { + public void setIndirectMap(Map indirectMap) { this.indirectMap = indirectMap; } /** * Sets the indirectMap property. */ - public MapTest indirectMap(StringBooleanMap indirectMap) { + public MapTest indirectMap(Map indirectMap) { this.indirectMap = indirectMap; return this; } + /** + * Puts a new item into the indirectMap map. + */ + public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) { + this.indirectMap.put(key, indirectMapItem); + return this; + } + @Override public String toString() { diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java index f8323b7e76..892306b389 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/MixedPropertiesAndAdditionalPropertiesClass.java @@ -20,6 +20,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class MixedPropertiesAndAdditionalPropertiesClass { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Model200Response.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Model200Response.java index 8bda567b99..d4a36c37f3 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Model200Response.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Model200Response.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * Model for testing model name starting with number */ @ApiModel(description="Model for testing model name starting with number") + public class Model200Response { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ModelApiResponse.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ModelApiResponse.java index 3f24ce9a87..b3f9be6ca8 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ModelApiResponse.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ModelApiResponse.java @@ -14,6 +14,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class ModelApiResponse { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ModelReturn.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ModelReturn.java index a339f3b086..2a7cb45523 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ModelReturn.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ModelReturn.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * Model for testing reserved words */ @ApiModel(description="Model for testing reserved words") + public class ModelReturn { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Name.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Name.java index e8bf282ad1..341dd203a6 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Name.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Name.java @@ -20,6 +20,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; * Model for testing model name same as property name */ @ApiModel(description="Model for testing model name same as property name") + public class Name { @ApiModelProperty(required = true, value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/NumberOnly.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/NumberOnly.java index 59b9db7ff8..1204458a9b 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/NumberOnly.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/NumberOnly.java @@ -15,6 +15,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class NumberOnly { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Order.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Order.java index 09d6b24775..03954f7ba6 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Order.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Order.java @@ -15,6 +15,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class Order { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/OuterComposite.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/OuterComposite.java index bdc1aaca2f..2274591cee 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/OuterComposite.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/OuterComposite.java @@ -15,6 +15,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class OuterComposite { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Pet.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Pet.java index ea553b6b55..216beffbf9 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Pet.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Pet.java @@ -1,7 +1,9 @@ package org.openapitools.model; import java.util.ArrayList; +import java.util.LinkedHashSet; import java.util.List; +import java.util.Set; import org.openapitools.model.Category; import org.openapitools.model.Tag; import javax.validation.constraints.*; @@ -18,6 +20,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class Pet { @ApiModelProperty(value = "") @@ -25,13 +28,13 @@ public class Pet { @ApiModelProperty(value = "") @Valid - private Category category = null; + private Category category; @ApiModelProperty(example = "doggie", required = true, value = "") private String name; @ApiModelProperty(required = true, value = "") - private List photoUrls = new ArrayList<>(); + private Set photoUrls = new LinkedHashSet<>(); @ApiModelProperty(value = "") @Valid @@ -154,21 +157,21 @@ public enum StatusEnum { */ @JsonProperty("photoUrls") @NotNull - public List getPhotoUrls() { + public Set getPhotoUrls() { return photoUrls; } /** * Sets the photoUrls property. */ - public void setPhotoUrls(List photoUrls) { + public void setPhotoUrls(Set photoUrls) { this.photoUrls = photoUrls; } /** * Sets the photoUrls property. */ - public Pet photoUrls(List photoUrls) { + public Pet photoUrls(Set photoUrls) { this.photoUrls = photoUrls; return this; } diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ReadOnlyFirst.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ReadOnlyFirst.java index f265ecabd1..3626bcf31a 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ReadOnlyFirst.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/ReadOnlyFirst.java @@ -14,6 +14,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class ReadOnlyFirst { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/SpecialModelName.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/SpecialModelName.java index 97b4ab4927..e072c1d8c3 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/SpecialModelName.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/SpecialModelName.java @@ -14,6 +14,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class SpecialModelName { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Tag.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Tag.java index 3c1cc5afe2..e65e4f5cfa 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Tag.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/Tag.java @@ -14,6 +14,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class Tag { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/TypeHolderDefault.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/TypeHolderDefault.java index 54f512a9a8..62e2db250a 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/TypeHolderDefault.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/TypeHolderDefault.java @@ -17,6 +17,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class TypeHolderDefault { @ApiModelProperty(required = true, value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/TypeHolderExample.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/TypeHolderExample.java index a94ba528de..1cdfe3a904 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/TypeHolderExample.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/TypeHolderExample.java @@ -17,6 +17,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class TypeHolderExample { @ApiModelProperty(example = "what", required = true, value = "") @@ -26,6 +27,9 @@ public class TypeHolderExample { @Valid private BigDecimal numberItem; + @ApiModelProperty(example = "1.234", required = true, value = "") + private Float floatItem; + @ApiModelProperty(example = "-2", required = true, value = "") private Integer integerItem; @@ -84,6 +88,31 @@ public class TypeHolderExample { return this; } + /** + * Get floatItem + * @return floatItem + */ + @JsonProperty("float_item") + @NotNull + public Float getFloatItem() { + return floatItem; + } + + /** + * Sets the floatItem property. + */ + public void setFloatItem(Float floatItem) { + this.floatItem = floatItem; + } + + /** + * Sets the floatItem property. + */ + public TypeHolderExample floatItem(Float floatItem) { + this.floatItem = floatItem; + return this; + } + /** * Get integerItem * @return integerItem @@ -175,6 +204,7 @@ public class TypeHolderExample { sb.append(" stringItem: ").append(toIndentedString(stringItem)).append("\n"); sb.append(" numberItem: ").append(toIndentedString(numberItem)).append("\n"); + sb.append(" floatItem: ").append(toIndentedString(floatItem)).append("\n"); sb.append(" integerItem: ").append(toIndentedString(integerItem)).append("\n"); sb.append(" boolItem: ").append(toIndentedString(boolItem)).append("\n"); sb.append(" arrayItem: ").append(toIndentedString(arrayItem)).append("\n"); diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/User.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/User.java index 232586cec7..5005cb8b48 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/User.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/User.java @@ -14,6 +14,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class User { @ApiModelProperty(value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/XmlItem.java b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/XmlItem.java index 5f5af93223..4d5b2c85b6 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/XmlItem.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/gen/java/org/openapitools/model/XmlItem.java @@ -17,6 +17,7 @@ import javax.xml.bind.annotation.XmlEnumValue; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonProperty; + public class XmlItem { @ApiModelProperty(example = "string", value = "") diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java index 6ebd879ad5..f9d503c40f 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java @@ -35,7 +35,7 @@ public class AnotherFakeApiServiceImpl implements AnotherFakeApi { { try { File cacheFile = new File(System.getProperty("jaxrs.test.server.json", - "/home/tduperron/git/zomzog/openapi-generator/samples/server/petstore/jaxrs-cxf-test-data/src/main/resources/test-data.json")); + "/Users/jim/projects/openapi-generator/samples/server/petstore/jaxrs-cxf-test-data/src/main/resources/test-data.json")); cache = JsonCache.Factory.instance.get("test-data").load(cacheFile).child("/org.openapitools.api/AnotherFakeApi"); } catch (CacheException e) { e.printStackTrace(); diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java index 2d987e5a1c..1727da7899 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java @@ -43,7 +43,7 @@ public class FakeApiServiceImpl implements FakeApi { { try { File cacheFile = new File(System.getProperty("jaxrs.test.server.json", - "/home/tduperron/git/zomzog/openapi-generator/samples/server/petstore/jaxrs-cxf-test-data/src/main/resources/test-data.json")); + "/Users/jim/projects/openapi-generator/samples/server/petstore/jaxrs-cxf-test-data/src/main/resources/test-data.json")); cache = JsonCache.Factory.instance.get("test-data").load(cacheFile).child("/org.openapitools.api/FakeApi"); } catch (CacheException e) { e.printStackTrace(); @@ -128,9 +128,9 @@ public class FakeApiServiceImpl implements FakeApi { } /** - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * - * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 + * Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 * */ @Override @@ -178,4 +178,9 @@ public class FakeApiServiceImpl implements FakeApi { } + @Override + public void testQueryParameterCollectionFormat(List pipe, List ioutil, List http, List url, List context) { + + } + } diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/FakeClassnameTags123ApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/FakeClassnameTags123ApiServiceImpl.java index 4440d69a1e..d59054f6df 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/FakeClassnameTags123ApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/FakeClassnameTags123ApiServiceImpl.java @@ -35,7 +35,7 @@ public class FakeClassnameTags123ApiServiceImpl implements FakeClassnameTags123A { try { File cacheFile = new File(System.getProperty("jaxrs.test.server.json", - "/home/tduperron/git/zomzog/openapi-generator/samples/server/petstore/jaxrs-cxf-test-data/src/main/resources/test-data.json")); + "/Users/jim/projects/openapi-generator/samples/server/petstore/jaxrs-cxf-test-data/src/main/resources/test-data.json")); cache = JsonCache.Factory.instance.get("test-data").load(cacheFile).child("/org.openapitools.api/FakeClassnameTags123Api"); } catch (CacheException e) { e.printStackTrace(); diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java index 19dbdf6631..eccd2f17f2 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java @@ -7,6 +7,7 @@ import java.util.List; import java.util.Map; import org.openapitools.model.ModelApiResponse; import org.openapitools.model.Pet; +import java.util.Set; import java.io.InputStream; import java.io.OutputStream; @@ -38,7 +39,7 @@ public class PetApiServiceImpl implements PetApi { { try { File cacheFile = new File(System.getProperty("jaxrs.test.server.json", - "/home/tduperron/git/zomzog/openapi-generator/samples/server/petstore/jaxrs-cxf-test-data/src/main/resources/test-data.json")); + "/Users/jim/projects/openapi-generator/samples/server/petstore/jaxrs-cxf-test-data/src/main/resources/test-data.json")); cache = JsonCache.Factory.instance.get("test-data").load(cacheFile).child("/org.openapitools.api/PetApi"); } catch (CacheException e) { e.printStackTrace(); @@ -86,9 +87,9 @@ public class PetApiServiceImpl implements PetApi { * */ @Override - public List findPetsByTags(List tags) { + public Set findPetsByTags(Set tags) { try { - List response = cache.getObjects("/findPetsByTags/response", Pet.class); + Set response = cache.getObjects("/findPetsByTags/response", Pet.class); return response; } catch (CacheException e) { throw new RuntimeException(e); diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java index 3de4afe148..b03f1b76e9 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java @@ -35,7 +35,7 @@ public class StoreApiServiceImpl implements StoreApi { { try { File cacheFile = new File(System.getProperty("jaxrs.test.server.json", - "/home/tduperron/git/zomzog/openapi-generator/samples/server/petstore/jaxrs-cxf-test-data/src/main/resources/test-data.json")); + "/Users/jim/projects/openapi-generator/samples/server/petstore/jaxrs-cxf-test-data/src/main/resources/test-data.json")); cache = JsonCache.Factory.instance.get("test-data").load(cacheFile).child("/org.openapitools.api/StoreApi"); } catch (CacheException e) { e.printStackTrace(); diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java b/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java index 0d97bd614b..29a22c8a64 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java @@ -35,7 +35,7 @@ public class UserApiServiceImpl implements UserApi { { try { File cacheFile = new File(System.getProperty("jaxrs.test.server.json", - "/home/tduperron/git/zomzog/openapi-generator/samples/server/petstore/jaxrs-cxf-test-data/src/main/resources/test-data.json")); + "/Users/jim/projects/openapi-generator/samples/server/petstore/jaxrs-cxf-test-data/src/main/resources/test-data.json")); cache = JsonCache.Factory.instance.get("test-data").load(cacheFile).child("/org.openapitools.api/UserApi"); } catch (CacheException e) { e.printStackTrace(); diff --git a/samples/server/petstore/jaxrs-cxf-test-data/src/main/resources/test-data.json b/samples/server/petstore/jaxrs-cxf-test-data/src/main/resources/test-data.json index e32a76dd3f..15bbf124cf 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/src/main/resources/test-data.json +++ b/samples/server/petstore/jaxrs-cxf-test-data/src/main/resources/test-data.json @@ -79,7 +79,7 @@ } }, "testEndpointParameters" : { - "_double" : 91.68589154730602421612164906388358076583244837820529937744140625, + "_double" : 91.68589154730603, "patternWithoutDelimiter" : "^K᫢", "_byte" : "VA==", "integer" : 79, @@ -118,6 +118,13 @@ "testJsonFormData" : { "param" : "Gfe588Q6", "param2" : "QBx28IQ" + }, + "testQueryParameterCollectionFormat" : { + "pipe" : [ "tCOmW" ], + "ioutil" : [ "iy6kr" ], + "http" : [ "yoZlS" ], + "url" : [ "zBeSEe" ], + "context" : [ "SP17wCv8k2" ] } }, "FakeClassnameTags123Api" : { diff --git a/samples/server/petstore/jaxrs-cxf-test-data/test-data-control.json b/samples/server/petstore/jaxrs-cxf-test-data/test-data-control.json index f368ad41cf..8f15d268ab 100644 --- a/samples/server/petstore/jaxrs-cxf-test-data/test-data-control.json +++ b/samples/server/petstore/jaxrs-cxf-test-data/test-data-control.json @@ -59,6 +59,23 @@ "param" : { "testItemCount" : 1 } + }, + "testQueryParameterCollectionFormat" : { + "pipe" : { + "testItemCount" : 1 + }, + "ioutil" : { + "testItemCount" : 1 + }, + "http" : { + "testItemCount" : 1 + }, + "url" : { + "testItemCount" : 1 + }, + "context" : { + "testItemCount" : 1 + } } }, "PetApi" : { diff --git a/samples/server/petstore/jaxrs-cxf/.openapi-generator/FILES b/samples/server/petstore/jaxrs-cxf/.openapi-generator/FILES index 4a4efad8b2..84f22716a3 100644 --- a/samples/server/petstore/jaxrs-cxf/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs-cxf/.openapi-generator/FILES @@ -52,15 +52,3 @@ src/gen/java/org/openapitools/model/TypeHolderDefault.java src/gen/java/org/openapitools/model/TypeHolderExample.java src/gen/java/org/openapitools/model/User.java src/gen/java/org/openapitools/model/XmlItem.java -src/main/java/org/openapitools/api/impl/AnotherFakeApiServiceImpl.java -src/main/java/org/openapitools/api/impl/FakeApiServiceImpl.java -src/main/java/org/openapitools/api/impl/FakeClassnameTags123ApiServiceImpl.java -src/main/java/org/openapitools/api/impl/PetApiServiceImpl.java -src/main/java/org/openapitools/api/impl/StoreApiServiceImpl.java -src/main/java/org/openapitools/api/impl/UserApiServiceImpl.java -src/test/java/org/openapitools/api/AnotherFakeApiTest.java -src/test/java/org/openapitools/api/FakeApiTest.java -src/test/java/org/openapitools/api/FakeClassnameTags123ApiTest.java -src/test/java/org/openapitools/api/PetApiTest.java -src/test/java/org/openapitools/api/StoreApiTest.java -src/test/java/org/openapitools/api/UserApiTest.java diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/FILES b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/FILES index 0fd81a975d..1a1af30150 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md build.gradle pom.xml diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/FILES b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/FILES index 0fd81a975d..1a1af30150 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md build.gradle pom.xml diff --git a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/FILES b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/FILES index 0fd81a975d..1a1af30150 100644 --- a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md build.gradle pom.xml diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/FILES b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/FILES index 45a534ea30..bacc5f1e61 100644 --- a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md pom.xml src/gen/java/org/openapitools/api/AnotherFakeApi.java diff --git a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/FILES b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/FILES index c15cd09f8b..3d66ff3429 100644 --- a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md pom.xml src/gen/java/org/openapitools/api/AnotherFakeApi.java diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/FILES b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/FILES index 45a534ea30..bacc5f1e61 100644 --- a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md pom.xml src/gen/java/org/openapitools/api/AnotherFakeApi.java diff --git a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/FILES b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/FILES index c15cd09f8b..3d66ff3429 100644 --- a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/FILES +++ b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md pom.xml src/gen/java/org/openapitools/api/AnotherFakeApi.java diff --git a/samples/server/petstore/kotlin-server/ktor/.openapi-generator-ignore b/samples/server/petstore/kotlin-server/ktor/.openapi-generator-ignore index 7484ee590a..cabbe3494d 100644 --- a/samples/server/petstore/kotlin-server/ktor/.openapi-generator-ignore +++ b/samples/server/petstore/kotlin-server/ktor/.openapi-generator-ignore @@ -1,23 +1,3 @@ # OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator +pom.xml -# 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/server/petstore/kotlin-springboot-reactive/.openapi-generator/FILES b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/FILES index ef3bba2490..e48401e8ff 100644 --- a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/FILES +++ b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md build.gradle.kts pom.xml @@ -21,6 +20,3 @@ src/main/kotlin/org/openapitools/model/Pet.kt src/main/kotlin/org/openapitools/model/Tag.kt src/main/kotlin/org/openapitools/model/User.kt src/main/resources/application.yaml -src/test/kotlin/org/openapitools/api/PetApiTest.kt -src/test/kotlin/org/openapitools/api/StoreApiTest.kt -src/test/kotlin/org/openapitools/api/UserApiTest.kt diff --git a/samples/server/petstore/kotlin-springboot/.openapi-generator/FILES b/samples/server/petstore/kotlin-springboot/.openapi-generator/FILES index 039f0b9053..612ea14bbd 100644 --- a/samples/server/petstore/kotlin-springboot/.openapi-generator/FILES +++ b/samples/server/petstore/kotlin-springboot/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md build.gradle.kts pom.xml @@ -22,6 +21,3 @@ src/main/kotlin/org/openapitools/model/Pet.kt src/main/kotlin/org/openapitools/model/Tag.kt src/main/kotlin/org/openapitools/model/User.kt src/main/resources/application.yaml -src/test/kotlin/org/openapitools/api/PetApiTest.kt -src/test/kotlin/org/openapitools/api/StoreApiTest.kt -src/test/kotlin/org/openapitools/api/UserApiTest.kt diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/FILES b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/FILES index c99e0a880a..b00a0510b7 100644 --- a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/FILES +++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/FILES @@ -18,21 +18,11 @@ ./Service/SymfonyValidator.php ./Service/TypeMismatchException.php ./Service/ValidatorInterface.php -./Tests/Api/PetApiInterfaceTest.php -./Tests/Api/StoreApiInterfaceTest.php -./Tests/Api/UserApiInterfaceTest.php ./Tests/AppKernel.php ./Tests/Controller/ControllerTest.php -./Tests/Model/ApiResponseTest.php -./Tests/Model/CategoryTest.php -./Tests/Model/OrderTest.php -./Tests/Model/PetTest.php -./Tests/Model/TagTest.php -./Tests/Model/UserTest.php ./Tests/test_config.yml .coveralls.yml .gitignore -.openapi-generator-ignore .php_cs.dist .travis.yml DependencyInjection/Compiler/OpenAPIServerApiPass.php diff --git a/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/FILES b/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/FILES index c59fff5c1b..ce2928201e 100644 --- a/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/FILES +++ b/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore README.md requirements.txt setup.py @@ -24,7 +23,4 @@ src/openapi_server/util.py test-requirements.txt tests/__init__.py tests/conftest.py -tests/test_pet_controller.py -tests/test_store_controller.py -tests/test_user_controller.py tox.ini diff --git a/samples/server/petstore/python-aiohttp/.openapi-generator/FILES b/samples/server/petstore/python-aiohttp/.openapi-generator/FILES index 416ab8ac6d..a4ced008df 100644 --- a/samples/server/petstore/python-aiohttp/.openapi-generator/FILES +++ b/samples/server/petstore/python-aiohttp/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore README.md openapi_server/__init__.py openapi_server/__main__.py @@ -24,7 +23,4 @@ setup.py test-requirements.txt tests/__init__.py tests/conftest.py -tests/test_pet_controller.py -tests/test_store_controller.py -tests/test_user_controller.py tox.ini diff --git a/samples/server/petstore/python-blueplanet/.openapi-generator/FILES b/samples/server/petstore/python-blueplanet/.openapi-generator/FILES index 2bc24d1ef3..129ea61cb4 100644 --- a/samples/server/petstore/python-blueplanet/.openapi-generator/FILES +++ b/samples/server/petstore/python-blueplanet/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore Makefile Makefile README.md diff --git a/samples/server/petstore/python-flask-python2/.openapi-generator/FILES b/samples/server/petstore/python-flask-python2/.openapi-generator/FILES index 57965000fd..2d71840efc 100644 --- a/samples/server/petstore/python-flask-python2/.openapi-generator/FILES +++ b/samples/server/petstore/python-flask-python2/.openapi-generator/FILES @@ -1,6 +1,5 @@ .dockerignore .gitignore -.openapi-generator-ignore .travis.yml Dockerfile README.md @@ -23,9 +22,6 @@ openapi_server/models/tag.py openapi_server/models/user.py openapi_server/openapi/openapi.yaml openapi_server/test/__init__.py -openapi_server/test/test_pet_controller.py -openapi_server/test/test_store_controller.py -openapi_server/test/test_user_controller.py openapi_server/typing_utils.py openapi_server/util.py requirements.txt diff --git a/samples/server/petstore/python-flask/.openapi-generator/FILES b/samples/server/petstore/python-flask/.openapi-generator/FILES index 57965000fd..2d71840efc 100644 --- a/samples/server/petstore/python-flask/.openapi-generator/FILES +++ b/samples/server/petstore/python-flask/.openapi-generator/FILES @@ -1,6 +1,5 @@ .dockerignore .gitignore -.openapi-generator-ignore .travis.yml Dockerfile README.md @@ -23,9 +22,6 @@ openapi_server/models/tag.py openapi_server/models/user.py openapi_server/openapi/openapi.yaml openapi_server/test/__init__.py -openapi_server/test/test_pet_controller.py -openapi_server/test/test_store_controller.py -openapi_server/test/test_user_controller.py openapi_server/typing_utils.py openapi_server/util.py requirements.txt diff --git a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/FILES b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/FILES index a46bb0e2e3..4bb76c23b2 100644 --- a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md pom.xml src/main/java/org/openapitools/OpenAPI2SpringBoot.java diff --git a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/FILES b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/FILES index f2551a2a0f..8c36406da4 100644 --- a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md pom.xml src/main/java/org/openapitools/OpenAPI2SpringBoot.java diff --git a/samples/server/petstore/springboot-delegate/.openapi-generator/FILES b/samples/server/petstore/springboot-delegate/.openapi-generator/FILES index 1a1b7db872..751215bab5 100644 --- a/samples/server/petstore/springboot-delegate/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-delegate/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md pom.xml src/main/java/org/openapitools/OpenAPI2SpringBoot.java diff --git a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES index 7facf65222..61420a325e 100644 --- a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md pom.xml src/main/java/org/openapitools/OpenAPI2SpringBoot.java diff --git a/samples/server/petstore/springboot-reactive/.openapi-generator/FILES b/samples/server/petstore/springboot-reactive/.openapi-generator/FILES index 6efa61ee0a..9df6c44a32 100644 --- a/samples/server/petstore/springboot-reactive/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-reactive/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md pom.xml src/main/java/org/openapitools/OpenAPI2SpringBoot.java diff --git a/samples/server/petstore/springboot-useoptional/.openapi-generator/FILES b/samples/server/petstore/springboot-useoptional/.openapi-generator/FILES index 7facf65222..61420a325e 100644 --- a/samples/server/petstore/springboot-useoptional/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-useoptional/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md pom.xml src/main/java/org/openapitools/OpenAPI2SpringBoot.java diff --git a/samples/server/petstore/springboot-virtualan/.openapi-generator/FILES b/samples/server/petstore/springboot-virtualan/.openapi-generator/FILES index ec6eea07cd..3a2d6eacf9 100644 --- a/samples/server/petstore/springboot-virtualan/.openapi-generator/FILES +++ b/samples/server/petstore/springboot-virtualan/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md pom.xml src/main/java/org/openapitools/OpenAPI2SpringBoot.java diff --git a/samples/server/petstore/springboot/.openapi-generator/FILES b/samples/server/petstore/springboot/.openapi-generator/FILES index 7facf65222..61420a325e 100644 --- a/samples/server/petstore/springboot/.openapi-generator/FILES +++ b/samples/server/petstore/springboot/.openapi-generator/FILES @@ -1,4 +1,3 @@ -.openapi-generator-ignore README.md pom.xml src/main/java/org/openapitools/OpenAPI2SpringBoot.java diff --git a/shippable.yml b/shippable.yml index c1bd579106..a5288e70b9 100644 --- a/shippable.yml +++ b/shippable.yml @@ -43,12 +43,3 @@ build: - mix --version # test samples defined in pom.xml - mvn --no-snapshot-updates --quiet verify -P samples.shippable -Dmaven.javadoc.skip=true - # below moved to CircleCI - ## generate all petstore samples (client, servers, doc) - #- ./bin/run-all-petstore - ## generate all petstore samples (openapi3) - #- ./bin/openapi3/run-all-petstore - ## generate test scripts - #- ./bin/tests/run-all-test - ## test all generators with fake petstore spec (2.0, 3.0) - #- ./bin/utils/test-fake-petstore-for-all.sh